Subject: Re: which(1) is a csh script?
To: None <tech-userlevel@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 10/06/2003 23:14:27
> I was amazed to find that which(1) is a csh script. It makes it
> rather hard to rely on it when searching for things in a $PATH
> variable, since csh as far as I can see sources $path instead and
> doesnt merge $PATH into it (and you are using ksh).
...huh? csh sets $path from $PATH on startup, at least in my
experience. (If you have a .cshrc that overrides the startup path,
that's your lookout. Also, there's some interesting danger potential
lurking around path elements containing colons, which cannot exist in
$PATH but can in $path.)
But most of the non-csh-family shells have something functionally very
similar to which(1) built in.
After all, if you want which to really tell the truth, it more or less
_has_ to be a builtin.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML email@example.com
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B