We use the C shell for many of the interactive examples in this book. History, aliases, and so forth make it far superior to the original Bourne shell for interactive use. (The newer Korn Shell combines features from both. And bash adds even more.) However, csh has some major drawbacks when it comes to shell programming.
Tom Christiansen explains some of the reasons in his famous tract "C Shell Programming Considered Harmful," which we've included as article 47.2. If you find yourself bristling at the tone of this article, remember that it was originally posted to . It is an example of that art form known colloquially as a "flame." As flames go, this is actually fairly mild.
We agree with most of Tom's criticisms, and make
no attempt to teach C shell programming in this book. We do however
include a few quick-reference style articles on constructs that we
use in articles about the C shell's
:-), the Bourne shell is missing.
loop, covered in another chapter, could be put in this chapter, too.)
$?prompt) can be used in if, switch,