1 May 2003 01:06
Re: /usr/bin/which is a csh script!!?!
George Michaelson <ggm <at> apnic.net>
2003-04-30 23:06:41 GMT
2003-04-30 23:06:41 GMT
Greg hits the nail on the head. When I was brought into the dark side, It was as a lowly tape-swapper on a mix of pdp-11, Vax-780 and Dec-10 nodes and had to interact with /bin/sh, /bin/csh, VMS and galaxy/tops-10. In making the 4.1BSD host my natural home I became infected with /bin/csh as a CLI. But pragmatism 21 years later means I have accepted the norms of the staff I now manage, and run bash, as they do. (an abberation into tcsh for a few years is best forgotten) Alas, my memory fades, and 'which' has more pervasive wiring in the drum than whence or command -v Like greg, I've hacked around it. I apologize for waking up a long, long dead thread. One cluebat hit was enough for me. cheers -George On Wed, 30 Apr 2003 12:37:12 -0400 (EDT) "Greg A. Woods" <woods <at> weird.com> wrote: > [ 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; <g.a.woods <at> ieee.org>; > <woods <at> robohack.ca> Planix, Inc. <woods <at> planix.com>; VE3TCP; Secrets of the > Weird <woods <at> weird.com> -- -- George Michaelson | APNIC Email: ggm <at> apnic.net | PO Box 2131 Milton QLD 4064 Phone: +61 7 3367 0490 | Australia Fax: +61 7 3367 0482 | http://www.apnic.net