Reputation: 63
tmpFilename="buildDefTemp.txt"
if [ -f $tmpFilename ]; then
rm -f $tmpFilename
fi
if [ -f $buildDefinitionFile ]; then
rm -f $buildDefinitionFile
fi
Upvotes: 1
Views: 5450
Reputation: 2055
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html
[ -f FILE ] True if FILE exists and is a regular file.
Upvotes: 3