I used to use `ls -d FILE; echo $?' to test if a file exists.  That,
however, fails with NetBSD 1.4 because there the ls program has a bug:
it doesn't set the exit status correctly.

Therefore, I have now switched to `test -e FILE; echo $?'.  And now I
find that the Solaris /bin/sh has a test builtin which doesn't grok
`-e'.  (/usr/bin/test on Solaris works, however.)

Ok.  Another alternative would be to use `/usr/bin/test -e FILE; echo
$?'.  But that doesn't work, because FreeBSD has /bin/test rather than
/usr/bin/test.  And Linux has /usr/bin/test rather than /bin/test.
Solaris has both.  And of course I cannot find out which `test' binary
to use until I can find out whether a file exists, and that I can't do
without a working `test' binary.

*wail*  *whimper*

kai
-- 
I like BOTH kinds of music.

Reply via email to