Skip to content

Instantly share code, notes, and snippets.

@qizhihere
Created July 3, 2015 13:49
Show Gist options
  • Select an option

  • Save qizhihere/d4c4757c7304aef255e9 to your computer and use it in GitHub Desktop.

Select an option

Save qizhihere/d4c4757c7304aef255e9 to your computer and use it in GitHub Desktop.
check if all commands exist
command-exist-p () {
local _command_exist=0
for i in "$@"; do
type -a "$i" &>/dev/null || _command_exist=1
done
return $_command_exist
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment