Skip to content

Instantly share code, notes, and snippets.

@JesseHerrick
Created January 18, 2014 23:44
Show Gist options
  • Save JesseHerrick/8498385 to your computer and use it in GitHub Desktop.
Save JesseHerrick/8498385 to your computer and use it in GitHub Desktop.
Check for a command in a shell script. Or outside of it...
#!/usr/bin/env bash
which $command &>/dev/null && echo true || echo false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment