To check, whether a file exists use this expression:
First, create the file thisFileExists.txt:
touch thisFileExists.txt
Now, check if it exists:
if [ -f thisFileExists.txt ]
then
echo It is there
fi
This is what it looks like in terminal:
No comments:
Post a Comment