Free course

Shell Scripting and Automation Course

Turn shell commands into dependable Bash programs with safe quoting, structured control flow, temporary files, logging, locks, and tests.

5 modules · 25 lessons · No signup

Prerequisites: Shell Commands

~~~

Your progress

of lessons completed.

Course completed.

What you'll learn

Write and test maintainable scripts that validate input, preserve data, report useful failures, and run safely without supervision.

Take this course offline

Subscribe to my newsletter to get every free book and course in PDF and EPUB format.

Get the downloads

Course contents

  1. Script foundations

    Create executable scripts, quote values, read arguments, and make exit status meaningful.

    1. Create an executable script
    2. Use variables and quoting
    3. Read positional arguments
    4. Return a useful exit status
    5. Check your understanding: script foundations
  2. Control and functions

    Use strict checks, conditions, loops, case matching, and small reusable functions.

    1. Enable safer failure behavior
    2. Branch with if and case
    3. Loop over arguments and files
    4. Write small functions
    5. Check your understanding: control and functions
  3. Files and data

    Manage temporary files, read lines, find files safely, and process JSON without fragile text parsing.

    1. Create and clean temporary files
    2. Read a file line by line
    3. Find files with null delimiters
    4. Process JSON with jq
    5. Check your understanding: files and data
  4. Reliable automation

    Handle configuration, secrets, logs, retries, locking, and scheduled non-interactive execution.

    1. Load configuration deliberately
    2. Write structured log lines
    3. Retry with a budget
    4. Prevent overlapping runs
    5. Check your understanding: reliable automation
  5. Automation projects

    Build a backup wrapper, health checker, deployment gate, and tested maintainable script.

    1. Build a backup wrapper
    2. Build a health checker
    3. Build a deployment gate
    4. Test and review the script
    5. Check your understanding: automation projects