Professional Bash scripting: automating Linux administration
Exit

Lesson 9 of 12 · Robustness and operations

Arguments and options: getopts, long options, built-in help and dry-run mode

45 min Debian 12

Objective

Turn a script that depends on the order of $1, $2, $3 into a tool used like a real Linux command: named options that can be grouped, with default values, built-in help, clear errors and a dry-run mode to check before acting.

This lesson is part of the full course

Unlock Professional Bash scripting: automating Linux administration to read every lesson, do the exercises, access the simulations and earn your certificate.

Already enrolled? Log in.