ssprkd.io
πŸ“œSkill assessment Β· 60 questions

Shell Scripting skill assessment

Quote it, trap it, ship it.

What it covers

Variables & Quoting

Quoting is the #1 source of shell bugs. Master when and how to quote so word splitting and globbing never bite you.

Single vs double quotesAlways quoting "$var" to prevent word splitting/globbingParameter expansion: ${var:-default}, ${var:?}, ${#var}Arrays and "${arr[@]}"Command substitution $(...)

Control Flow

Choose the right test and loop constructs, and read input safely. The differences between [[ ]], [ ], and (( )) matter.

[[ ]] vs [ ] vs test; (( )) arithmeticString vs integer comparisoncase statementsfor / while / untilReading files safely: while IFS= read -r line

Functions & Arguments

Write reusable functions and parse arguments robustly, understanding positional parameters and scope.

Positional params: $1, "$@" vs "$*"shift and argument iterationlocal variables and scopeReturn codes vs echoed outputOption parsing with getopts

Pipes & Redirection

Control where input and output flow. File descriptors, redirection order, and pipefail scope are common stumbling blocks.

stdin/stdout/stderr (fd 0/1/2)> vs >>, and 2>&1 orderingHere-docs <<EOF and here-strings <<<Pipelines, pipefail, and subshell variable scopeProcess substitution <(...)

Text Processing

The classic Unix text tools turn streams into answers. Know which tool fits which job and the core syntax of each.

grep / cut / sort / uniq / tr basicssed substitutionawk fields, $1, NR, FSComposing tools in pipelines

Robust Scripting

Turn fragile scripts into dependable ones with strict modes, cleanup traps, and proper error handling.

set -euo pipefail (and each flag's caveats)trap for cleanup on EXITmktemp for safe temp filesExit codes and $?Linting with shellcheck

Ready to benchmark your Shell Scripting skills?

60 questions Β· about 5 minutes Β· see your level and percentile instantly.

Take the assessment β†’

Explore other assessments