Subject: Re: PR's about which(1)
To: Johan Danielsson <>
From: Andreas Kahari <>
List: current-users
Date: 04/02/2004 11:02:35
On Fri, Apr 02, 2004 at 10:16:29AM +0200, Johan Danielsson wrote:
> (Michael van Elst) writes:
> > Possibly. But POSIX is the reason why Solaris keeps a 'which' as a
> > shell script in the path (among other shell commands).
> Since POSIX does not define which, I doubt this is the real reason.

POSIX (SUSv3) has "command -v" and "command -V", and it says:

    The  command  -v  and  -V  options  were  added  to  satisfy
    requirements from  users that are currently  accomplished by
    three different  historical utilities: type in  the System V
    shell, whence  in the KornShell,  and which in the  C shell.
    Since there  is no historical  agreement on how and  what to
    accomplish here, the POSIX  command utility was enhanced and
    the historical utilities were  left unmodified.  The C shell
    which merely  conducts a path search.   The KornShell whence
    is more elaborate-in addition  to the categories required by
    POSIX, it also reports on tracked aliases, exported aliases,
    and undefined functions.

from the Rationale for the "command" utility:

|{  }| Andreas Kähäri
| }{ |
|{  }| East Anglia
| }{ | England