A little light entertainment...

I thought it was time I installed abcm2ps on my Macs.  I already
have it on a PC, but I don't often use that machine, and it would
be much nicer to have it where I work.

Downloaded it and double-clicked the .pkg file, went through the
installer without any trouble.  Started up Terminal and typed
abcm2ps -h and got "Command not found".  OK.  So where has the
installer put it?  Did a search with the Finder's Find command.
Not found.  Did the search again, this time allowing it to
search invisible folders.  OK.  There it is, in
/usr/local/bin

Try typing "/usr/local/bin/abcm2ps -h" and lo and behold it works.
So far so good.  I don't want to type all that every time I use
it, so I need to change the search path to include that location.
Can't remember how to do that, so I dig out the unix book.
"Unix for the Impatient" by Abrahams and Larson.  Well, not very
impatient as it's 824 pages long.  Also quite battered now from
having been thrown against the wall in blind fury several times
(well, it's better than throwing the computer).

After about half an hour with the book I remember that there's
a variable called PATH (or is that $PATH - the book seems to
use them interchangeably).  And there's another one called
path, which is not the same.  All this somewhat complicated
by the fact that the book covers four different unix shells,
including csh, but not tcsh, which is what I have.  They
can't be that different can they?  After all I'm not trying
to do anything complicated or difficult here.

Following the book I type

echo $PATH

and get

/bin:/sbin:/usr/bin:/usr/sbin:

So it's looking in four different places, none of which is where
the program is located, and I need to change that to

/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin

The book says "You can set PATH to any search sequence you wish using
the facilities in your shell for assigning values to variables; see
for example section 6.15.6."

Section 6.15.6 says "You can assign values to one or more variables
with an assignment (single or multiple) of the form:

variable=value[variable=value...]

and gives as examples:

CAT=tabby
GOAT='the chomper'

Couldn't be easier.
So I type

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
echo $PATH

and it says

/bin:/sbin:/usr/bin:/usr/sbin:

No good.  So I try:


PATH='/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin'
$PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
$PATH='/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin'

with no more luck.  Then in desperation I try the same
things with path, even though I've figured out by now
that that's a shell variable and changing it will only
affect the current session.  Still no good.

Go make a cup of coffee and think for a bit out of
punching range of the computer.  Remember that there's
a command called setenv (oh yes, I've been here before
you know, it's just that it's been a while and you forget
these things).

Back at the computer I type "man setenv" to see what comes
up.  What comes up is the entire manual for the tcsh shell,
hundreds of little 24-line pages, and after hitting the
space bar enough times to risk RSI without seeing anything
about setenv I give up.  The book says just enter

setenv name val

without any equals sign, so I try it.  And try it again
in all the combinations I tried before.  No go.

OK.  I admit defeat I cannot change the search path, but
I've had another idea.  Why dont I alias "abcm2ps" to
"/usr/local/bin/abcm2ps" to save the typing?  Ought to
work.  To cut a long story short, that didn't work either.
No error messages;  just didn't work.

Finally (I'll give you one more chance, you silicon moron!)
I try plan C.  If the program doesn't work in it's present
location I'll move it to one of the directories which _is_
on the search path.  I can't move it using the Finder,
because the top level folder of the file path is invisible.
So I type

mv /usr/local/bin/abcm2ps /usr/bin/abcm2ps

muttering "Do as your F****** told or I'll reboot you in
OS 9!

and it says "Permission Denied".  Now what do I do?
I can't log in as root because Apple in their infinite
wisdom have disabled that.  I could try screwing around
with chmod, but it would take me another hour to
figure out the magical incantation necessary to make that
work (I've been there before too).

So I reboot in OS 9, use ResEdit to make the usr folder
visible and move the file using the Finder.  Takes
about 20 seconds max.  Reboot in OS X and now typing
abcm2ps in the Terminal works fine.

So, you guys who choose to work in unix, what do you do
when faced with a task where you know exactly what you are
trying to do, but nothing works, over and over?

Apart from reboot in a different operating system, that
is?  (And newer Macs can't even do that for God's sake.)

Phil Taylor



To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

Reply via email to