Basic bash scripting. How to find if a file exists or not.
This simple example shows how to check if a file exists or not. This is how we do this. if [ -f "/home/jason/foo" ]if [ -f "/home/jason/foo" ] Putting it together in a script makes it simple to verify if the file exists or not. if [ -f "/home/jason/foo" ] then echo "file does exist." … Read more