Subject: Re: which(1) is a csh script?
To: None <tech-userlevel@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: tech-userlevel
Date: 10/07/2003 09:23:23
On Tue, 7 Oct 2003 12:12:44 +0100, David Laight <david@l8s.co.uk> wrote:
> On Tue, Oct 07, 2003 at 12:50:27PM +0200, Jesper Louis Andersen wrote:
> > I initially thought which where a standard of some kind, relying on
> > a C program. For compliance I will use ''command -v'' instead.
> 
> Unfortunately you might have to implement it!
> I added the support to sh in netbsd last year, I don't know about
> open/freebsd, nor what bash does (but bash is badly non-conformant
> anyway).

Bash has it:

$ echo $0
bash
$ type which
which is hashed (/usr/bin/which)
$ command -v which    
/usr/bin/which
$ command -V which
which is hashed (/usr/bin/which)

--jkl