Bite Size Bash (Print + PDF)
Includes both a print and PDF version.
bash is a very weird programming language.
$ x = 2 x: command not found
Variable assignment is weird, it’s hard to quote things, if statements run programs instead of checking a boolean value, its default error handling feels like it’s designed to cause catastophic bugs, and that’s just the beginning.
And despite it being so weird, it’s everywhere! We use shell scripts all the time to configure servers and run our builds. So you end up frantically googling bash facts in an emergency when your test suite breaks because it was held together by a bash script that nobody on your team understands.
But bash has one thing going for it: it doesn’t change much. Bash scripts today are pretty much exactly the same as they were 15 years ago. So if you take the time today to learn the weird way bash works, everything you learn will still be true in 10 years.
And there aren’t that many weird facts about bash you need to learn to be able to understand & change most bash scripts with confidence. If you learn everything in this zine you’ll be way more comfortable with bash scripting than most programmers :).