Skip to content
Command Line
-
Command Line
Shell Variables, Quoting and Exit Codes: bash vs zsh
Variables, quoting, $?, set -euo pipefail, loops and functions run in bash 3.2 and zsh 5.9, with real errors and the cases strict mode lets through.
-
Command Line
Robust Shell Scripts: Locks, Traps, Logs and Cron
A shell script template with strict mode, mkdir lock, cleanup trap, timestamped log and --dry-run, attacked with kill -9 and SIGTERM, plus cron pitfalls.
-
Command Line
Processes, Jobs and Signals: Exit Codes 130/137/143
ps, kill, trap, jobs, wait and nohup on macOS bash and zsh: why kill -INT did nothing, an orphaned child process, and measured xargs -P speedup.
-
Command Line
Pipes and Redirection: grep, sort, uniq on a Real Log
stdin, stdout, stderr, >, >>, 2>&1 and pipes, practiced on a generated 20,000-line log with grep, sort, uniq, wc and cut. Real traps, and a loop timing.
-
Command Line
find, xargs, sed and awk on macOS: BSD vs GNU Traps
find + xargs with spaces in names, sed and awk one-liners on a generated access log, and the BSD vs GNU differences that break Linux answers on a Mac.
-
Command Line
Terminal Basics: Paths, Files and Spaces in Names
First steps in the macOS terminal: pwd, ls, cd, mkdir, cp, mv, rm, real error messages, why rm -r My Project deleted the wrong folder, and cp vs mv measured.
↑