File Existence Question (Urgent)

G'day all

Just wondering if anyone can help me, is it possible, within a Bourne Shell script, to check if a entered file exists? :confused:

An example would be (And this is the reason why I'm asking) If I was to write a super-basic backup script, and the user entered a filename, what sort of code would be suitable to check whether or not the file is actually there.

Thankyou all for your help

Cheers and Beers (If your old enough)

Aussie_Bloke

Check the manual pages for your shell (look for "if" statements), the "test" command, and integrate them...

For example:

if [ -n "$var" ]; then
echo Blap
else
echo Bloop
fi

Beaut

Thanks a ton mate

Cheers and Beers

Aussie_Bloke