Daily Shaarli

All links of one day in a single page.

Previous day

October 14, 2026

Next day

Better Bash Scripting in 15 Minutes

The tips and tricks below originally appeared as one of Google's "T esting on the Toilet" (TOTT) episodes. 

I start every bash script with the following prolog:

#!/bin/bash
set -o nounset
set -o errexit

Use functions

  • Favor $() over backticks (`)
  • Favor [[]] (double brackets) over []
  • Avoiding Temporary Files with <()