| "type" is a built-in in POSIX shells, and even the pre-historic SunOS
| /bin/sh has a "type" built-in, be it a bare-bones version that does not
| support the "-p" switch, that is sufficient. So another possibility is:
|
| set -- `type find`
| shift `expr $# - 1`
| # Now, $1 is the full path of "find".
| # ...
FYI, the expr (which will cost an extra fork/exec in Bourne sh and ksh88)
can be avoided easily:
set -- `type find`
set -- $# "${@:-}"
shift $1
# Now, $1 is the full path of "find".
One may wish to check type's return code, as well.
Best,
Chuck