essay · feb 22 · 2026
A modest defense of bash.
Yes, even now. Even with Go, even with Python, even with the LLM in your editor. Three places I keep reaching for shell, and the one rule I never break.
A friend who writes Rust for a living asked me, with a small amount of pity, why I still wrote so much bash. The honest answer is that bash is still the right tool for three specific jobs and I’m not interested in pretending otherwise.
Three places bash wins
- Glue between binaries. Pipe, redirect, exit codes. No language does this with less ceremony.
- One-off, single-machine cleanup. Twenty lines of bash beats two hundred lines of Python if you’re never going to read the file again.
- CI scripts that fail loud.
set -euo pipefailand a fewifblocks. CI engineers have been writing this since 2008 for a reason.
The rule I never break
Once a bash script grows past 80 lines, or starts wanting structured data, I rewrite it. The line is arbitrary, but it’s the line where bash stops paying you and starts charging you. I’ve never regretted enforcing it. I’ve often regretted ignoring it.