Book
A serious publisher has contacted me about writing a serious book about Linux shell programming.
It is all really very serious. I’m not used to being serious, as you can probably tell from the fact that I have now used the word “serious” four times in this three-sentence post.
I am rather keen to write a book on the subject, not because I’m vain, or desperate for money, but because the stuff I have seen out there in dead-tree format has been of rather low quality. Also because of all the emails I’ve received over the years, they have all been positive, and none has said anything along the lines of “I didn’t need any of that because I bought Book[X]“, or indeed any book. People have emailed me, asking for advice as to what book to buy, and I have been unable to recommend any book that I have seen.
So:
What would you like to see in your ideal book about UNIX / Linux shell scripting, be it Bourne, Bash, ksh, tcsh, zsh, whatever?
Please don’t be timid; if you want to know how to work out how many nose-flutes can be fitted into the area of a Boeing 757, you won’t be anything like as strange as some of the correspondants I’ve had over the years, so please, tell me what is bugging you, what has bugged you, or even what you think might be likely to bug you in days / months / years to come.
I’m likely to answer any specific questions here and now, whether or not they end up in the book, but anything you’d like to see in a book, too… post that here, and I’ll have a stab at it.
Also, I would of course be interested to know if you have found any useful books on or around the subject, and what they did particularly well.
Steve
May 5, 2008 at 2:49 pm
One of the reasons Jeff Friedl’s regular expressions book is so good is that it spent a lot of time discussing how a regex engine could/would be implemented (but not at such a low level as to be tedious). Knowing the underlying concepts means not having to memorize a bunch of random stuff because you can pretty much predict how it’s going to work.
Accordingly, I think it would be good to have a couple of chapters on the implementation of the rudimentary concepts of a bourne shell. How is script parsed? When and how is each fragment executed and how are the outputs and inputs piped around? The more conceptual and portable (not a bunch of bashisms) the better. Going light on the various unix utilities would also be good. Yes, they’re an integral part of any script, but they’re easy to learn via manpages. Explaining utils like test and expr would be necessary but I’d like to read “here’s roughly what they do, now go read the manpage if you want to follow along.”
Also, I’d personally like to have a bit of a csh survival guide for sh users, but I can probably find that online. But a deeper look at the underlying differences (why are they different?) could be interesting.
May 5, 2008 at 9:56 pm
Thanks kamper - really good points, especially about the “how it works”, not “how to do it” - that makes a big difference.