Subject: Re: /usr/bin/which is a csh script!!?!
To: Andrew Brown <>
From: Greg A. Woods <>
List: current-users
Date: 04/30/2003 12:37:12
[ On Wednesday, April 30, 2003 at 09:27:14 (-0400), Andrew Brown wrote: ]
> Subject: Re: /usr/bin/which is a csh script!!?!
> imho, the real bug is shells that provide aliases but don't provide
> something like which(1) as a builtin, which is the only really wrong
> case (shells that provide aliases and will only tell you that
> something is an alias aside).  which shells are the broken ones?

The only shell so broken in any official NetBSD release is "csh" itself,
which is why there's a which(1) script just for it.

The real problem that you (and perhaps others) seem to have missed
completely is that there are lots of users who have either grown up
accustomed to typing "which" to find out what kind of thing some command
is, or have been taught to do so by some unthinking mentor who grew up
doing so.  As a result those who use a "Real Shell(tm)" with a "command"
or "whence" built-in that "Does The Right Thing(tm)", will still end up
trying to use "which" instead, and thus why even on my systems where
I've obliterated and eliminated all traces of "csh", I still have a
"which" command, now implemented as a /bin/sh script.  :-)

								Greg A. Woods

+1 416 218-0098;            <>;           <>
Planix, Inc. <>; VE3TCP; Secrets of the Weird <>