You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vidar Holen edited this page Feb 26, 2018
·
14 revisions
which is non-standard. Use builtin 'command -v' instead.
Problematic code:
which grep
Correct code:
command -v grep
Rationale:
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.