ugh.book

(singke) #1

50 Documentation?


Under the Bourne shell (the ‘standard’ Unix shell), the set command
sets option switches. Under the c-shell (the other ‘standard’ Unix
shell), ‘set’ sets shell variables. If you do a ‘man set,’ you will get
either one or the other definition of the command (depending on the
whim of the vendor of that particular Unix system) but usually not
both, and sometimes neither, but definitely no clue that another, con-
flicting, definition exists.

Mistakenly using the ‘set’ syntax for one shell under the other
silently fails, without any error or warning whatsoever. To top it off,
typing ‘set’ under the Bourne shell lists the shell variables!

Craig

Undocumented shell built-ins aren’t just a mystery for novice, either.
When David Chapman, a leading authority in the field of artificial intelli-
gence, complained to UNIX-HATERS that he was having a hard time
using the Unix fg command because he couldn’t remember the “job num-
bers” used by the C-shell, Robert Seastrom sent this helpful message to
David and cc’ed the list:
Date: Mon, 7 May 90 18:44:06 EST
From: Robert E. Seastrom <[email protected]>
To: [email protected]
Cc: UNIX-HATERS

Why don’t you just type “fg %emacs” or simply “%emacs”? Come
on, David, there is so much lossage in Unix, you don’t have to go
inventing imaginary lossage to complain about! <grin>

The pitiful thing was that David didn’t know that you could simply type
“%emacs” to restart a suspended Emacs job. He had never seen it docu-
mented anywhere.

David Chapman wasn’t the only one; many people on UNIX-HATERS
sent in e-mail saying that they didn’t know about these funky job-control
features of the C-shell either. (Most of the people who read early drafts of
this book didn’t know either!) Chris Garrigues was angrier than most:
Date: Tue, 8 May 90 11:43 CDT
From: Chris Garrigues <[email protected]>
To: Robert E. Seastrom <[email protected]>
Cc: UNIX-HATERS
Subject: Re: today’s gripe: fg %3
Free download pdf