Why set -e Is Not Exception Handling: The Real Rules of Shell Errexit
A control-flow model for shell errexit covering tested commands, lists, pipelines, functions, subshells, command substitutions, traps, and explicit errors.
tag
10 posts
A control-flow model for shell errexit covering tested commands, lists, pipelines, functions, subshells, command substitutions, traps, and explicit errors.
A precise model of shell file descriptors, left-to-right redirection, duplication versus paths, grouping, pipelines, persistent descriptors, and safe logging.
A POSIX getopts pattern covering OPTIND, OPTARG, leading-colon diagnostics, required operands, repeated calls, function scope, and portable limitations.
A rigorous guide to shell here-document parsing, quoted delimiters, expansion, tab stripping, indentation, remote commands, and safer data handling.
A systems-level guide to POSIX terminal input processing, canonical and noncanonical reads, echo, signals, control characters, job control, and restoration.
Shell variables and the process environment overlap but differ. Export, fork/exec, subshells, pipelines, sourcing, and Shellshock define where changes survive.
How commercial Unix fractured across codebases and alliances while POSIX and the Single UNIX Specification preserved portable interfaces.
Writing shell scripts that run correctly under any POSIX-compliant shell, not just whichever one happens to be installed on your own machine.
Ubuntu 6.10 switched its default /bin/sh from Bash to the stricter Dash in October 2006 for faster boot times, surfacing years of non-portable scripts.
Bash, Zsh, and sh accept most of the same commands, which is exactly what makes their real differences easy to miss until a script breaks.