Course 1 of 8 on the DevOps Engineer path

Shell scripting with Bash

Write reliable Bash scripts: variables, quoting, conditions, loops, functions, error handling, text processing with grep, sed and awk, and scheduling with cron and systemd.

  • 7 lessons
  • About 68 min reading
  • Beginner to intermediate
  • Updated 13 Nov 2026

After this course you can

  • Write scripts that handle arguments, quoting, conditions, loops and functions correctly
  • Make scripts fail safely with exit codes, set -euo pipefail, traps and ShellCheck
  • Process logs and config files with grep, sed and awk
  • Schedule scripts with cron or systemd timers and avoid the usual cron traps
  • Read and fix other people's scripts in a CI or deployment pipeline

Before you start: the Linux for DevOps course, especially files, permissions, pipes and redirection.

Lessons

Reliable scripts

  1. A complete script: a safe backup job10 min

Know it, or think you know it?

Take a free mock interview on Shell scripting with Bash for DevOps Engineer: 3 questions, a score and feedback on each, in about 10 minutes.