Is there a way in sh or bash to check purely whether a file exists? All of the tests I can find do things like "does it exist *and* is it a normal file" or "... *and* is it a directory" or "... *and* is it a character special file" etc.

What I'm looking for is the equivalent of the C expression

access(path, 0) == 0

Thanks in advance,

Harry O.

PS - Worst case, I'll just write a tiny C program, but this is for an installation script and I'd prefer to rely purely on standard tools.


-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to