Skip to content

Instantly share code, notes, and snippets.

@sarnobat
Created September 19, 2017 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sarnobat/cf24cf6761dd86a1e4678713c494af03 to your computer and use it in GitHub Desktop.
Save sarnobat/cf24cf6761dd86a1e4678713c494af03 to your computer and use it in GitHub Desktop.
test -e "$1" || echo "[DEBUG] Does not exist: $1"
# Do we ever need if-else syntax? Probably not but here it is anyway:
if [ -e "$1" ]
then
echo "ok"
else
echo "nok"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment