Competencies: CLI & Terminal > Shell & Scripting
Shell & Scripting
Body of Knowledge
| Topic | Description | Relevance | Career Tracks |
|---|---|---|---|
Bash Fundamentals |
Variables, quoting rules, command substitution, arithmetic, exit codes, positional parameters, special variables ($?, $$, $!). |
Critical |
All Engineering |
POSIX Shell Compatibility |
Portable shell scripting, POSIX vs bashisms, /bin/sh considerations, compatibility testing, shellcheck. |
High |
DevOps, Systems Administrator, SRE |
Conditionals and Loops |
if/elif/else, case statements, for/while/until loops, break/continue, test operators ([[ ]] vs [ ]). |
Critical |
All Engineering |
Parameter Expansion |
Default values (${var:-default}), pattern removal (${var##pattern}), substring, array slicing, indirect expansion. |
High |
Shell Developer, Automation, DevOps |
Arrays and Associative Arrays |
Indexed arrays, associative arrays (declare -A), array operations, iteration patterns, bash 4+ features. |
High |
Shell Developer, DevOps, SRE |
Pipes and Composition |
Unix philosophy, pipeline construction, avoiding UUOC, tee for splitting, process substitution <(cmd). |
Critical |
All Engineering |
Here Documents |
Heredocs for multi-line strings, variable expansion control ('EOF' vs EOF), indentation handling, here-strings. |
High |
All Engineering |
Functions |
Function definition, local variables, return values, recursion, function libraries, sourcing files. |
High |
Shell Developer, DevOps |
Signal Handling |
trap command, signal names, cleanup on exit, interrupt handling, graceful shutdown patterns. |
Medium |
Shell Developer, SRE |
Error Handling |
set -e/-u/-o pipefail, error checking patterns, logging, exit codes, errexit pitfalls. |
High |
DevOps, SRE, Shell Developer |
Input/Output Redirection |
stdin/stdout/stderr, file descriptors, redirection operators, here-documents, process substitution. |
Critical |
All Engineering |
Zsh Features |
Extended globbing, array syntax differences, prompt customization, completion system, oh-my-zsh. |
Medium |
Shell Developer, Power User |
Personal Status
| Topic | Level | Evidence | Active Projects | Gaps |
|---|---|---|---|---|
Pipes / Composition |
Advanced |
Multi-stage pipelines (cmd1 | cmd2 | cmd3); avoid UUOC; reduce pipe stages (grep+awk = just awk); tee for stream splitting |
No named pipes (FIFOs) for complex IPC, no coproc |
|
Process Substitution |
Advanced |
diff <(cmd1) <(cmd2), paste file <(cmd); treat command output as file without temp files; used for comparing config states |
No complex process substitution chains, still reaching for temp files occasionally |
|
Parameter Expansion |
Advanced |
${var:-default}, ${var##pattern}, ${var%%pattern}, ${#var}, ${var/old/new}; array slicing; used in shell scripts for string manipulation without external tools |
No indirect expansion (${!var}), no namerefs in scripts |
|
Heredocs |
Advanced |
Heredoc commits (gach/gacp), multi-line config generation, EOF with variable expansion control ('EOF' vs EOF); daily workflow for git commits |
Fully comfortable — no significant gaps |