BOTW: Bash Cookbook

This week I read the Bash Cookbook by Carl Albing, JP Vossen, and Cameron Newham. It is a collection of features, tips, and explanations for the GNU Bash shell, which is (probably) the most commonly encountered shell on Linux. I have recently had an itch to try out different shells, but before making any complete move I wanted to learn more about Bash so as to have a better idea of what functionality I may be giving up or have to relearn.

So was the Cookbook helpful in that regard?

Oh Wow Yes

Weighing in right at six-hundred pages, the Bash Cookbook covers everything you could care to know about the shell and then some. Its first chapter, ‘Beginning Bash’, provides a nice introduction to the concept of Unix shells and why you should care in the first place. From then on each chapter is a collection of ‘recipes’, in keeping with the cookbook theme, grouped into broad collections. Examples of chapters:

  • Executing Commands
  • Working With Dates and Times
  • Parsing and Similar Tasks

Each chapter has a collection of recipes which allow follow the same format with four parts, in order:

  1. A problem that you may reasonably encounter.

  2. The solution.

  3. A thorough explanation of the solution and its implications.

  4. A list of other recipes related to the problem in some way.

You can read the book from cover to cover without any problems. But this format also makes the Cookbook valuable as a reference. The broad topics of the chapters coupled with the narrow focus of each recipe within makes it easy to quickly find a part of the book relevant to any issue I’m having with Bash.

I hesitate to use the adjective ‘terse’ for any book that is six-hundred pages, but the Cookbook authors do not waste words. Instead of repeating the same things over and over, as so many technical books do, they explain things clearly in one place and then reference that as needed everywhere else. Such a structure may sound obvious to some readers—why would anyone not do that? There are various reasons why technical and programming books are often padded, but that’s a story for another day. The important note to take away from this is, despite its size, the Bash Cookbook is an efficient text. The size does not reflect the verbosity of the authors. It reflects the enormous amount of crap there is to learn about Bash.

I thought I knew Bash pretty well before reading this book. I felt like I could call myself a ‘power user’. Well, I was wrong. If you use Bash on just a semi-regular you need this book. It makes for a terrific reference—much better than the official Texinfo documentation in my opinion. The Cookbook is well written, neatly organized, and cleanly explains everything you will ever care to know about Bash. I thoroughly enjoyed it from start to finish. Of course, I am the kind of nerd that enjoys reading about shells….

Next Book of the Week

Next week I am reading Shaders for Game Programmers and Artists by Sebastian St-Laurent. I hope it doesn’t demand too much from the ‘artist’ perspective, because man am I bad at that….

Add Your Thoughts

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s