Shell by Example is a hands-on introduction to shell scripting using annotated example programs. Check out the first example or browse the full list below.
Examples marked with POSIX work in any POSIX-compliant shell (sh, dash, bash, zsh, etc.). Examples marked with Bash require Bash-specific features.