inside shell

which foo >/dev/null command -v foo >/dev/null 2>&1 type foo >/dev/null 2>&1 hash foo 2>/dev/null

if [[ -n “${commands[perlbrew]}” ]] ; then … fi

http://hyperpolyglot.org/unix-shells

Avatar
zhoumingjun

My work interests include devops, gaming and programmable matter.