Created
July 3, 2015 13:49
-
-
Save qizhihere/d4c4757c7304aef255e9 to your computer and use it in GitHub Desktop.
check if all commands exist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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