A comprehensive, professional course on Bash and Shell Scripting — from your first script to production-grade automation.
Shell scripting is one of the highest-leverage skills a developer, sysadmin, or DevOps engineer can have. A well-written script can automate hours of manual work, protect systems from failure, and act as the backbone of entire deployment pipelines.
This course is structured as a full beginner-to-advanced journey. It starts from the very basics (what even is a shell?) and builds up to production-quality scripting patterns — error handling, security, scheduling, and a full capstone project.
💡 This course uses Bash — the default shell on virtually every Linux distribution and available on macOS. Differences with
zshandshare noted where relevant.
Build the foundation. Understand what a shell is, write your first script, and master variables and input.
| # | Lesson | Topics |
|---|---|---|
| 01 | What is Shell Scripting? | Shell vs kernel, script anatomy, why Bash |
| 02 | Your First Script | Shebang, chmod +x, PATH, built-in vars |
| 03 | Variables and Data Types | Strings, integers, export, readonly, defaults |
| 04 | User Input and Arguments | read, positional params, shift, getopts |
| 05 | Quoting and Escaping | Single/double quotes, $(), printf |
Make your scripts intelligent. Learn to branch, loop, and organize code into reusable functions.
| # | Lesson | Topics |
|---|---|---|
| 01 | Conditional Statements | if/elif/else, [[ ]], &&, || |
| 02 | Comparison Operators | String, integer, file test operators |
| 03 | Loops — for, while, until | All loop types, break, continue |
| 04 | Case Statements | case/esac, glob patterns, menus |
| 05 | Functions | Declaring, arguments, local, source |
Master the Unix text-processing ecosystem. Learn to filter, transform, and manipulate data at scale.
| # | Lesson | Topics |
|---|---|---|
| 01 | Working with Files | cat, head, tail, wc, sort, uniq, cut |
| 02 | Text Processing — grep, sed, awk | Filter, substitute, field-based processing |
| 03 | Pipes and Redirection | |, >, >>, 2>, tee, heredocs |
| 04 | Regular Expressions | BRE/ERE, anchors, quantifiers, POSIX classes |
| 05 | File Permissions and Ownership | chmod, chown, umask, setuid, sudo |
Write scripts that are ready for production: parallel execution, scheduling, robust error handling, and security.
| # | Lesson | Topics |
|---|---|---|
| 01 | Process Management | Background jobs, wait, kill, signals, trap |
| 02 | Scheduling with Cron | Cron syntax, crontab, lock files |
| 03 | Debugging and Error Handling | set -euo pipefail, set -x, trap ERR, logging |
| 04 | Arrays and String Operations | Indexed/associative arrays, string manipulation |
| 05 | Script Security Best Practices | Injection, validation, secrets, ShellCheck |
| 06 | Capstone Project | Full System Health Monitor script |
- Go sequentially — Each module builds on the previous. Module 01 is the prerequisite for everything else.
- Type the code yourself — Reading is not enough. Type every example into your terminal. Muscle memory is how shell scripting sticks.
- Experiment and break things — The best learning happens when something doesn't work the way you expect. Use
set -xto trace what's happening. - Run ShellCheck on your scripts — Install it and make it a habit:
shellcheck myscript.sh. - Build the capstone — Module 04's capstone project is where everything comes together into something real.
- A Linux or macOS machine (or WSL2 on Windows)
- A terminal emulator and a text editor
- No prior shell scripting experience required
"The shell is a programmer's power tool — the more fluent you become in it, the more you can accomplish with a single line."