[2125] in SIPB bug reports

home help back first fref pref prev next nref lref last post

where

daemon@ATHENA.MIT.EDU (ckclark@Athena.MIT.EDU)
Wed Oct 2 16:12:02 1991

From: ckclark@Athena.MIT.EDU
Date: Wed, 2 Oct 91 16:11:07 -0400
To: marc@Athena.MIT.EDU
Cc: bug-sipb@Athena.MIT.EDU
Reply-To: ckclark@mit.edu

> Is there a reason to keep the where program in the sipb locker?

Consider for a minute the possibility that you are running a shell which
does not have a built-in ``which'' command. 

Let's look at the state of the utilities available to determine where
programs are:

/usr/ucb/which is only useful for users of a version of csh which does
*not* support the built-in.  I know of only one such version of csh
available on Athena: the vendor csh for the RS/6000.

As for the /usr/ucb/whereis command, it ignores the PATH environment
variable completely, opting instead to search a list of hard-coded
directories, including such frequently used locations as the following:

/src/ucb/pascal/utilities
/usr/hosts
...

(For a good time, run strings on /usr/ucb/whereis.)

The SIPB where program is also potentially useful in scripts, where the
which csh builtin has problems.  For example, the following script:

#!/bin/csh -f
set bar = `/mit/sipb/vaxbin/where bindtest`
echo "bar is " $bar

produces the expected output: 

bar is /mit/watchmaker/vaxbin/bindtest

But if I use `which' instead of /mit/sipb/vaxbin/where, I get:

ioctl: Operation not supported on socket
bar is  /mit/watchmaker/vaxbin/bindtest

Also, if the program is kept, I think one of the e-mail addresses listed
under AUTHORS, although still working, is archaic. :-)

-Calvin

home help back first fref pref prev next nref lref last post