Debian's which hunt
Debian's which hunt
Posted Oct 28, 2021 18:18 UTC (Thu) by smcv (subscriber, #53363)In reply to: Debian's which hunt by oever
Parent article: Debian's which hunt
> "type -Pp $command" gives the path to the file that would be executed and nothing for aliases.
In bash, yes. In other shells or on non-Linux OSs, no, so this is less portable than `command -v` (and in particular dash doesn't implement the -P or -p options).
POSIX specifies the `type` command, but does not specify any valid options for it.
