The which tool is used to locate a program file in the user's PATH. This which code is from NetBSD's whereis.c and originally from 3.0BSD.
5 lines
94 B
Bash
5 lines
94 B
Bash
#!/bin/bash
|
|
unalias -a
|
|
unset -- "$@" &> /dev/null
|
|
enable -n -- "$@" &> /dev/null
|
|
type -p "$@"
|