Command Substitution vs Process Substitution
$(command) captures text; <(command) exposes a live stream as a path-like argument. Buffering, exit-status visibility, and portability differ sharply.
Operating systems, infrastructure, emulation, and technical history.
$(command) captures text; <(command) exposes a live stream as a path-like argument. Buffering, exit-status visibility, and portability differ sharply.
Shell variables and the process environment overlap but differ. Export, fork/exec, subshells, pipelines, sourcing, and Shellshock define where changes survive.
Errors like bad interpreter and $' ': command not found mean carriage returns reached a Unix shell script - confirm bytes, convert, enforce Git policy.
cron starts jobs with a small, non-interactive environment - make paths, interpreters, working directories, and logging explicit rather than sourcing a login shell.
Mojibake, invalid byte errors, and inconsistent sorting usually come from a locale mismatch - diagnose bytes and locale variables before converting anything.
A prompt that's slow only inside repositories is usually running expensive Git status work on every redraw - profile it, isolate repository scale, cache safely.
When forwarded SSH authentication fails, trace the socket, agent keys, server policy, and hop-by-hop configuration, then decide if forwarding is justified.
Separate shared environment, shell-specific syntax, secrets, and machine-local state, then deploy links idempotently and make rollback intentional.
Test Fish, Nushell, or another shell as an interactive tool first: inventory compatibility, isolate configuration, benchmark real tasks, keep a recovery shell.
A maintainable shell library needs a documented target shell, namespaced functions, no import-time surprises, and tests run in fresh processes.