[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Portable equivalent of "type -p"?

[You (Jeff Sheinberg)]
>jdassen@wi.leidenuniv.nl writes:
> > 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)

Which doesn't work with 'ash', of course.  'ash' isn't really a very good /
bin/sh, if by /bin/sh we mean a POSIX 1003.2 compliant shell.  I almost
think you'd do better with bash invoked as 'sh'.  'ksh' seems pretty POSIX
compliant too.

.....A. P. Harris...apharris@onShore.com...<URL:http://www.onShore.com/>

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: