Feed on
Posts
Comments

file existence can be tested for in a conditional using the -a operator:

if [ -a filename.txt ]

then

echo “file here!”

fi

Stumble it!

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

Did I get this wrong? Let me know!

Trackback URI | Comments RSS

More blogs about http://desk.stinkpot.org:8080/tricks.