Skip to content

Instantly share code, notes, and snippets.

@JeffChien
Created October 6, 2013 15:50
Show Gist options
  • Save JeffChien/6855609 to your computer and use it in GitHub Desktop.
Save JeffChien/6855609 to your computer and use it in GitHub Desktop.
$ command -v foo >/dev/null 2>&1 || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }
$ type foo >/dev/null 2>&1 || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }
$ hash foo 2>/dev/null || { echo >&2 "I require foo but it's not installed. Aborting."; exit 1; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment