Wicked Cool Shell Scripts

Over on YouTube, my BASH Scripting series is pretty popular. It teaches the basics of how to leverage shell scripting, and even pushes into intermediate level usage a bit. (And with the flexibility of YouTube, I’ll be able to add to the course and make it better all the time.)

But I’ll never be able to cover everything with my tutorials. Shell scripting is just too awesome. In fact, one of my fellow Nerdlings (hi James!) wanted to know if I had any book suggestions to learn even more about what sort of things are possible. And boy howdy, do I ever.

Dave Taylor has forgotten more about shell scripting than I’ll ever know. We were both columnists at Linux Journal back when it was a magazine. His column was, of course, about shell scripting. Every month, we’d get to learn how powerful BASH (and other shells) can be, while having fun at the same time. This book is basically like 101 of his columns organized into a super fun, and wicked cool collection.

When I review a book, I always try to find both good points and bad points. That’s not just so I look deep and introspective, but because for books I dislike I want to show the best bits which might tip someone over the edge in spite of my negative opinion. And for books I like, I think it’s important to point out weak spots so that I don’t “trick” anyone into getting a book they might regret. It’s difficult to find negatives with this book. I was going to say that a digital copy of the scripts in the book in a github repository would be nice. But then I see the scripts are all available directly from No Starch Press, so I can’t even complain about that. I guess my complaint is that I couldn’t find a reference to the digital copies in the book itself. But that’s pretty weak for a complaint. Yeah, it’s a pretty great book.

The Baking Soda Volcano of Linux

The “best” parts of the book are also hard to pick, because it covers so many aspects of scripting, automation, problem solving, and fun. I think that last one is the most important though. This book is organized into sections like “Unix Tweaks”, “System Maintenance”, and, “Working with the Web”. But you might honestly never use a single script in this book. Directly.

Dave (and Brandon, more on him in a second) provide working, usable scripts for us to use. But the real magic is that they teach us why the scripts do what they do, and how we can do the same sort of things for our own particular use cases. Just like building a baking soda and vinegar volcano doesn’t actually solve a particular science need — these scripts teach us how scripting works, so we can use that knowledge in useful ways. Granted, building a case statement that parses command line arguments doesn’t have the same panache as Kool-Aid scented lava foam drowning clay-and-toothpick townsfolk. But it does teach concepts just as well. (and shell scripts are much easier to clean up…)

If you’re looking for an exact formula to solve a problem, this book is probably not what you’re looking for. If, however, you want to understand the ingredients so you can make your own perfect formula? In the words of the Kool-Aid Man, “Oh yeah!” This is the book you want. And if you actually want to make a digital volcano? Honestly, there might be a script that does something close. Because that’s the sort of teaching style that makes me love Dave’s writing so much.

Second Edition

While still not a new book, the 2nd edition of Wicked Cool Shell Scripts includes the work of Brandon Perry. From what I can tell, Brandon did much of the updating and tweaking to make sure the scripts in the book were up to date. The second edition released in 2016, and while there have certainly been changes in command line shells since then — it’s still very up-to-date, and very relevant as a resource.

I don’t mean to take anything away from Brandon Perry’s contributions to this book, as he’s one of the authors, and a very accomplished writer himself. But as this is a second edition of a book originally solo-authored by Dave Taylor, so it’s hard to tell which bits are Dave’s and which are Brandon’s. For us readers, it doesn’t really matter all that much. Wicked Cool Shell Scripts, 2nd Edition is a wicked cool book, written by two wicked awesome writers, which will teach you to be a wicked sweet shell scripter. And you’ll have a ton of fun doing it. I highly recommend it both as a reference book, and a read-it-all-the-way-through book, because if you enjoy scripting, you’ll get something out of all 101 shell scripts in this book. (and out of the extras thrown in the final chapters too!)

My Rating: 5.0 out of 5.0 stars