Determine if file exists in a Bourne/bash shell script

Posted October 20, 2003 by Rex in Bourne shell scripting


if [ -f testfile ]
then
echo testfile exists!
fi

The Conversation

Follow the reactions below and share your own thoughts.