Bash Guide

In September 2018, my Bash Quick Start Guide (archived) was published with Packt Publishing. It’s a crash course in writing and reading Bash and POSIX-fearing shell script in general. It’s available in both ebook and paperback formats, and is reasonably short (180 pages).

Bash Quick Start Guide

The aim of the book is to demystify shell and make it pleasant and expressive to write. It’s ideal if you’ve used Bash before, but just picked it up as you needed it, along with the bad habits that a lot of material on the internet suggests. It focusses on correcting these common mistakes and writing shell script in a way that’s robust and relatively easy to understand and manage.

This was the only book I could find that lays out best practises for bash scripting, such as proper quoting, variable naming, and parameter expansion. There are many books that will show you a lot of interesting script examples but they’ll also teach you bad habits that might get you into trouble down the road. This would be a great first book for anyone looking to write safe, portable scripts. Highly recommended!

— user “Kinger”

Tom’s careful grounding in the fundamentals of how and why things work in Bash is valuable both as an introduction for newcomers and in refining the skills of experienced users. Even if you have been around Bash for a while you will learn new and useful things from this book, and probably almost immediately.

—Michael Fincham

Definitely the Bash book I was looking for 15 years ago.

—Nick Jensen