test file existence in bash
February 12th, 2007 by Lawrence David
file existence can be tested for in a conditional using the -a operator:
if [ -a filename.txt ]
then
echo “file here!”
fi
February 12th, 2007 by Lawrence David
file existence can be tested for in a conditional using the -a operator:
if [ -a filename.txt ]
then
echo “file here!”
fi