|
|
|
|
|
by 22c
1695 days ago
|
|
You can use command -v in any POSIX compliant shell. csh is not POSIX compliant. Your list of shells in inexhaustive to the point of being almost misleading. bash and zsh are "heavy-weight" shells, a lot of lightweight shells also support command. If you're specifying your shebang as #!/bin/sh then you should not assume you have access to functions like type or binaries like which, but you can generally assume you have access to the command built-in. |
|
'type' is actually POSIX though. bash does extend it.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/t...