which and the current directory
dale chayes
dale at lamont.ldgo.columbia.edu
Tue Mar 26 00:00:05 AEST 1991
Last night, I posted a note about problems with "which" not finding
files in the current directory:
>
> In article <3531 at lamont.ldgo.columbia.edu>, dale at 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!)
> >
I got an e-mail message shortly after posting from Brendan (at sgi)
confirming that which worked properly for him, so I dug deeper.
Which is a shell script (/usr/bsd/which) and SGI has added
optional args including -f (but not -x) which is the "fast" version and
does not source ~/.cshrc. Using this option, which did find the local prog.
So, that meant that it was probably a problem with my very own .cshrc file.
I found that I was unconditionaly setting my prompt which everyone
knows is not a "good thing" and can interfere with all kinds of programs
and scripts. After I fixed my .cshrc not only did which work right, but
M-x compile (in emacs) started working (the grand total of progress for
yesterday (;-)).
This morning, Vern (at sgi) posted a note similar to Brendan's mail
and I got an email message from Brent (at NASA) all confirming that which
worked for them.
To all who replied, thanks.
Dale
--
Dale Chayes Lamont-Doherty Geological Observatory of Columbia University
Route 9W, Palisades, N.Y. 10964 dale at lamont.ldgo.columbia.edu
voice: (914) 359-2900 extension 434 fax: (914) 359-6817
More information about the Comp.sys.sgi
mailing list