Skip to content

Instantly share code, notes, and snippets.

@itsamenathan
Created January 3, 2014 21:53
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 itsamenathan/8247369 to your computer and use it in GitHub Desktop.
Save itsamenathan/8247369 to your computer and use it in GitHub Desktop.
Check if command exists
if hash foo 2>/dev/null; then
echo "foo"
else
echo "no foo"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment