Pattern: Use of non-standard which
Issue: -
which
is a non-standard, external tool that locates an executable in PATH. command -v
is a POSIX standard builtin, which uses the same lookup mechanism that the shell itself would.
Example of incorrect code:
which grep
Example of correct code:
command -v grep