Bash for ops, done safely
A real beginner path through Bash for operations work. Start with your first script and the language itself — variables, arguments, conditionals, loops, functions, arrays, and text processing — then reach the part most courses skip to: writing it safely. Strict mode honestly explained, quoting that survives spaces, traps that clean up, temp files without races, and ShellCheck to keep it that way. Fourteen lessons, each with a runnable example and a self-check, ending in a real ops script built end to end.
01
Bash fundamentals
8 lessons01Your first scriptShebang, chmod +x, and running it.12 min02Variables, quoting & command substitutionStore values, capture command output, quote from day one.18 min03Arguments, input & redirection$1, stdin, pipes, and > vs >>.18 min04Exit codes & testing$?, [[ ]], and && / || logic.16 min05Conditionals: if & caseBranching on tests and patterns.15 min06Loops: for, while & reading filesRepeat work and read input line by line.18 min07Functions & argumentsReusable blocks with their own parameters.16 min08Arrays & parameter expansionLists, defaults, and string surgery without extra tools.18 min
02
Writing bash safely
5 lessons01set -euo pipefail, honestlyWhat it catches, what it famously does not.20 min02Quoting and word splittingThe bug class behind most script incidents.25 min03Traps and cleanupEXIT traps that always run.25 min04Safe temp files and locksmktemp, flock, and race conditions.20 min05ShellCheck in CILint every script, block the classics.15 min
03
Putting it together
1 lessonProgress is saved in this browser only — no account required.
Final exam
Test yourself on everything
12 questions drawn from all 2 sections — every answer explained as you pick.