I am the Host. This is Bash · expert, lesson 1: nounset + defaults. Read the teaching and the stills before the checks. The quizzes are open book and test the subject — Bash itself — not product rules or layout trivia.
Bash Expert · Lesson 1 · On the house
nounset + defaults
${var:-}. Lesson 1 is free — on the house.
Lessons · Bash Expert · Lesson 1 of 10 · On the house
nounset + defaults
${var:-}

Expert assumes Introductory through Medium. We go deep — no beginner restarts.
${var:-default} if unset or empty.
${var:=default} also assigns.
${var:?msg} exits if unset/empty.
Know :- vs - with set -u.
Put nounset + defaults in a sentence you could teach a friend: what changes, what stays the same, and what you expect from the still.
Change one dial at a time when you experiment, then re-run. Batch changes invent ghost bugs.
Predict the still on paper before you type. Prediction turns running into confirmation.
Name each token in the still aloud. Hesitation marks the exact gap.
When something fails, read the last error line first. Calm retries beat rewriting everything.
Open-book means the page is a tool. Pick the claim that matches what we traced.
Keep mistaken traces beside corrected ones. The diff is the real lesson.
Label the runtime or toolchain you are using. Boring mismatches still burn evenings.
default
echo "${name:-world}"Sit with that still. Trace it top to bottom. Name each piece. The exercise asks you to match its essence.
If something fails when you try it yourself, change one thing. Read the error. Return to the still. I will not rush you.
Quiz
${name:-world} yields?
Quiz
${var:?} exits if?
Quiz
:- vs - differs on?
Check
Match the still for: nounset + defaults.
That is the lesson. When every quiz and exercise on this page is green, mark it passed. Next lesson when you are ready.
Open-book: the answers are on this page. Pass every quiz and check (4) to mark the lesson done. This visit: 0/4.