A review by christopherc
Classic Shell Scripting: Hidden Commands That Unlock the Power of Unix by Arnold Robbins, Nelson H. Beebe

4.0

By the time the last edition of O’Reilly’s Classic Shell Scripting was published in 2005, the approach it used was already somewhat out of date and the readership it addressed on the way out. The authors assumed that one is using any one of a number of old commercial versions of Unix, and might just be sharing a system with a number of other users, when nowadays most people doing anything with a Unix-style shell are probably running Linux on their own PCs.

However, don’t let that scare you away, because this book still has the potential to change your computing life forever. The authors’ careful and clear advice on using piped commands to build up scripts allows one to automate a great deal of one’s work away. Operations on text (which is potentially anything in a Unix-style system) that earlier may have taken me hours, now take minutes or seconds, and I’m a lot more confident in the output. Here are some random examples of things I’ve been able to quickly do in the last 24 hours thanks to this book:

* Search/replace a tag among the thousands of MP3 files in my collection in one go;
* Batch resize a collection of several dozen PDFs, producing two different output sizes for each document
* Rebuild a lost address book by extracting all phone numbers sent to me in e-mails and linking them to the names of the senders.

A Bash script, or simply interactively typing a series of commands at the command line, is a great solution for one-off jobs, as with an awareness of just a handful of small utilities you can move mountains, while using a more formal programming language like Python would be more time-consuming.

In its novice-intermediate portions, this book somewhat overlaps with O’Reilly’s Learning the Bash Shell, and in its advanced portions with Effective Awk Programming. Those other two books have the same now-antiquated approach, but all three books are still worth reading for a rigorous course in the Linux command line.

I do wish that O’Reilly would publish a newer edition. Besides writing something that speaks more directly to the needs of shell learners on single-user Linux installations, it would also be necessary to explain the subtle differences between Bash and Dash, as the latter has become the default script-running shell in many Linux distributions.