Mission 348

Predictable output contract

Create machine-readable status lines and verify their shape.

Shell scripting
8 minutes Admin Lesson 348 of 360
printfteegrep
Lesson 348 of 360 0/360 lessons 0/17 missions Shell scripting · 8 minutes
0%
Continue View profile
Ops lab terminal Training lab
New learnerrank 0XP 0%complete
learner@clairos:/home/learner $ Unix ops lab: type a command, press Enter
Instructions 8 minutes

Click any instruction for the command details, the why, and the common mistake to avoid.

Write a status line

Run printf status=ready | tee lab/status.env.

printf status=ready | tee lab/status.env
Verify the status key

Run grep status lab/status.env.

grep status lab/status.env
Read the output contract

Run cat lab/status.env.

cat lab/status.env
Lesson support

What to notice while you play.

Objective

Build repeatable confidence with producing predictable script-style status output.

Hint

Start with printf status=ready | tee lab/status.env, inspect the result, then continue in order.

Why it matters

Producing predictable script-style status output helps operators explain what they know before they change anything.

Common mistakes
  • Skipping the output that proves producing predictable script-style status output.
  • Changing several things before recording a baseline.
Reference

Commands in this lesson.

printf <text>

Print formatted training text.

grep [-i] <text> <file>

Find literal text inside a file.

tee <file>

Write piped text to a lab file and keep it on screen.