Subject: Re: getting abcde to work
To: Sam Carleton <sam@linux-info.net>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-help
Date: 12/28/2002 13:21:53
On Sat, 28 Dec 2002, Sam Carleton wrote:

> On Sat, Dec 28, 2002 at 12:12:42PM -0600, Frederick Bruckman wrote:
> > On Sat, 28 Dec 2002, Sam Carleton wrote:
> >
> > > CDPARANOIA="/usr/pkg/bin/cdparanoia"
> > >
> > > But then it simply replyed with
> > >
> > > abcde error: /usr/pkg/bin/cdparanoia is not in your path.
> >
> > The script itself has the "#!/bin/sh", so it shouldn't matter what
> > shell you invoke it with. HOWEVER, inspection reveals that it calls
> > the csh script "which", instead of the POSIX built-in "command -V". I
> > bet your installation installs another "which", or else does something
> > weird with that. What do you get when you type
> >
> >    which which
> >    which cdparanoia
> >    which /usr/pkg/bin/cdparanoia
> >
> > ? In any case, trying changing the "which" where it says "which $X" to
> > "command -V $X" (both places in "abcde").
>
> I gave it a try and 'which cdparanoia' works where as 'command
> -V cdparanoia' doesnt' work!  But I am getting the same
> problem.

"command -V" wouldn't work under "tcsh", but the script doesn't run
under "tcsh".

The big problem with using "which" in Bourne Shell scripts, is that
"which" isn't a built-in, but rather a "csh" script, and is therefore
sensitive to things in your "~/.cshrc", as you found out. ;-)

Frederick