I want to be able to tell if a command exists on any POSIX system from a shell script.
On Linux, I can do the following:
if which ; th
command -v is a POSIX specified command that does what which does.
command -v
It is defined to to return >0 when the command is not found or an error occurs.