Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!sgi!vjs@rhyolite.wpd.sgi.com From: vjs@rhyolite.wpd.sgi.com (Vernon Schryver) Newsgroups: comp.sys.sgi Subject: Re: which and the current directory Keywords: /usr/bsd/which and path Message-ID: <93371@sgi.sgi.com> Date: 25 Mar 91 00:01:01 GMT References: <3531@lamont.ldgo.columbia.edu> Sender: guest@sgi.sgi.com Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 21 In article <3531@lamont.ldgo.columbia.edu>, dale@lamont.ldgo.columbia.edu (dale chayes) writes: > I found (after too much exploration (;-)) that /usr/bsd/which will not > find an executable in the current directory if is specified in the > environment's $path as in: > > set path = (. ~/bin /usr/bsd /bin /usr/bin /usr/sbin /usr/local/bin) > > The shell (at least csh) finds them with out trouble (as > long as they are really there!) > How come? (I can't believe that this hasn't turned up before. There must be something else going on, since it works for me. No doubt you know that `set path = ..` does not set the environment directly, but sets a csh variable that sets the environment variable PATH. /usr/bsd/which is just a csh script. It even has comments. `csh -x /usr/bsd/which foobaz` might illuminate what is going on. Vernon Schryver, vjs@sgi.com