Subject: Re: /usr/bin/which is a csh script!!?!
To: NetBSD-current Discussion List <current-users@netbsd.org>
From: Dave Huang <khym@azeotrope.org>
List: current-users
Date: 04/30/2003 13:01:33
On Wed, Apr 30, 2003 at 06:06:55PM +0100, David Laight wrote:
> $ csh
> % which which
> which: shell built-in command.
> % /usr/bin/which which
> /usr/bin/which
> % which -a which
> -a: Command not found.
> which: shell built-in command.
> %
> 
> Doesn't even obey the man page...

Seems okay to me... "which which" says it's a built-in. Correct.

"/usr/bin/which which" doesn't know about built-ins, so it finds
/usr/bin/which. Maybe not exactly correct, but okay.

"which -a which" runs the csh builtin "which," which doesn't claim to
support the "-a" option. See the csh(1) manpage. It's /usr/bin/which
that takes the "-a" option. No problem there.

"/usr/bin/which -a which" returns /usr/bin/which.
-- 
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym@azeotrope.org |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 27 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++