I am using the command -v "program" >/dev/null 2>&1 construct if I need to POSIX-ly find out if such program is installed in an if-statement.
From its help page is not clear, whether it checks only for path or also for the executable bit?
$ command --help
command: command [-pVv] command [arg ...]
...
-v print a description of COMMAND similar to the `type' builtin
...
Thank you.
command -vwill still consider builtins, which take precedence over executables. Try e.g.command -V testorcommand -V printf