SHARE
TWEET
Untitled
a guest
Jul 13th, 2015
218
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- function __cmd.is_callable() {
- local cmd_type=`type -t $1`
- if [[ (-n $1) && (("$cmd_type" == @(builtin|function)) || ("$cmd_type" == @(file|alias) && -x `which $1`)) ]]; then
- echo 'YES we CAN use this command'
- else
- echo 'NO we CAN NOT use this command'
- fi
- }
RAW Paste Data
