Learn Bash – all lessons
15 lessons from beginner to advanced, building on each other and with code examples.
Terminal, Navigation & Files
Change folders, create, copy, move, delete and read files.
Pipes & Redirection
Chain programs and direct input/output into files.
Variables, Quoting & Arithmetic
Store values, set quotes correctly, command output and arithmetic.
Conditions: if, [[ ]] and case
Branching, file and text tests, comparisons and pattern matching.
Loops: for, while, until
Work through lists, number ranges, files and lines.
Functions
Reusable building blocks with arguments, local variables and return values.
Script Arguments & getopts
$1, $@, $#, shift, default values and parsing options.
grep, sed, awk & Co.
Filter, replace and analyze text – the tools for logs and CSV.
find, xargs & Bulk File Processing
Find files by name, age and size and apply commands to them.
Exit Codes, Error Handling & set -euo pipefail
Reliable scripts: detect errors, abort and clean up.
Arrays, Associative Arrays & Parameter Expansion
Handle lists safely and split strings without external programs.
Here-Docs, Process Substitution & Debugging
Embed multi-line text, treat command output like files and debug scripts.
Processes, Jobs, Signals & trap
Background jobs, parallel execution, catching signals and cleaning up properly.
Script Best Practices & Portability
Robust, maintainable scripts: template, quoting, ShellCheck and the limits of Bash.
Automation with cron & a Practical Project
Run scripts on a schedule: crontab syntax, environment, logs and locks.