Use 'command -v' over 'which' to find a program's executable
Redowan Delowar
November 16, 2021
One thing that came to me as news is that the command which - which is the de-facto tool
to find the path of an executable - is not POSIX compliant. The recent [Debian which hunt]
brought it to my attention. The POSIX-compliant way of finding an executable program is
command -v, which is usually built into most of the shells.
So, instead of doing this:
Do this:
[debian which hunt]:
https://lwn.net/Articles/874049/
Discussion in the ATmosphere