Shell scripting cheat sheets
Printable cheat sheets for Bash strict mode, quoting, POSIX sh vs Bash, Dockerfile RUN and GitHub Actions shell. Every example opens in the checker.
One-page references for the parts of shell scripting people look up most.
- Bash strict mode and error handling cheat sheet
Printable cheat sheet for set -euo pipefail, traps, exit codes and safe error handling in Bash, with the exceptions that trip people up.
- Bash quoting and parameter expansion cheat sheet
Quick reference for Bash quoting rules and parameter expansion: defaults, substrings, search and replace, arrays and safe word splitting.
- POSIX sh vs Bash cheat sheet
Side-by-side cheat sheet of Bash-only syntax and its POSIX sh equivalent, for scripts that must run under dash, ash or BusyBox.
- Dockerfile RUN and shell cheat sheet
Cheat sheet for safe, small and reproducible Dockerfile RUN instructions: shell options, apt-get, pinning, users, secrets and caching.
- GitHub Actions shell scripting cheat sheet
Cheat sheet for safe shell in GitHub Actions run steps: default shell flags, passing inputs through env, outputs, secrets and pinned actions.