Skip to content

Instantly share code, notes, and snippets.

@iampbernardo
Created December 18, 2013 08:08
Show Gist options
  • Save iampbernardo/8018863 to your computer and use it in GitHub Desktop.
Save iampbernardo/8018863 to your computer and use it in GitHub Desktop.
Bash scripting: Check if file exists
if [ -f /wherever/foo.txt ]
then
# Do stuff if foo.txt exists
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment