Re: Portable equivalent of "type -p"?
> Is there a portable (POSIX) way of determining which binary will be called
> for a particular command?
According to "Unix for the Impatient", 2nd Edition, by Abrahams and
Larson, p. 128:
An alternative to "which" is the POSIX command `command -v' (see
Section 5.10.1, p. 288:
This form is used to determine how the shell interprets a command
name and can be used in place of the "type" command.
-v Produce the interpretation given to `cmd':
o If `cmd' designates an executable file of any kind, produce
the absolute pathname of that file.
o If `cmd' is an intrinsic shell command, produce the string
o If `cmd' is an alias (see Section 6.19), produce the
definition of the alias.
Jeff Sheinberg <firstname.lastname@example.org>
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to email@example.com .