Bash / Shell Scripting
A complete 25-lesson Bash scripting course — from variables, quoting, and control flow through arrays, text processing with grep/sed/awk, strict mode, trap-based cleanup, and argument parsing, culminating in a log file analyzer, an automated backup script with rotation, and a system health-check framework.
25 Lessons · 750 min · Learning Platform Editorial Team
What you need on the desk
- A terminal with bash 4+ (bash 5.x recommended) — Linux and macOS ship with bash; Windows users can use WSL or Git Bash
- A code editor (VS Code recommended)
- curl and jq installed for one Advanced lesson (both are free and available via any package manager)
Know this much before you start
- Comfortable at a Linux/macOS command line — navigating directories, running commands, reading output. This course does NOT re-teach general command-line basics (see the Linux tutorial on this site for that); it goes deep specifically into Bash as a scripting language.
- No prior scripting experience needed — every concept builds from the ground up, assuming only that you can already use a terminal
- A Linux, macOS, or WSL environment with bash installed to follow along (bash 5.x is used throughout; almost every example also works on bash 4.x)
By the end, you can
- Write, chmod, and run real bash scripts using correct shebang, quoting, and variable-scoping conventions
- Use arrays, parameter expansion, and arithmetic confidently, and know exactly when [[ ]] beats [ ]
- Process text with grep, sed, and awk, and chain commands together with pipes, redirection, and here-documents
- Write production-grade scripts with strict mode (set -euo pipefail), trap-based cleanup, and safe subshell/process-substitution patterns
- Debug scripts with set -x and catch bugs before running them with ShellCheck
- Build and test real automation: a log file analyzer, an automated backup script with rotation, a system health-check framework, and a small CLI tool with subcommands