998 B
998 B
type, title, xp, duration, difficulty
| type | title | xp | duration | difficulty |
|---|---|---|---|---|
| challenge | The Scripter | 100 | 35 | 3 |
The Scripter
[INCOMING — Mission Control, Earth]
Cadet, time to combine commands. Bash lets you embed the output of one command inside another using
$(...)— command substitution:echo "Today is $(date '+%Y-%m-%d')" # → Today is 2026-05-04When your script runs, a directory
supplies/exists with several files. Producereport.txtcontaining exactly two lines:Date: <today in YYYY-MM-DD format> Files in supplies: <count of entries in supplies/>Two helpers:
date '+%Y-%m-%d'— today in the right formatls supplies | wc -l | tr -d ' '— entry count, whitespace stripped[END TRANSMISSION]
Your Task
In starter/starter.sh, use echo + $(...) substitution to
produce the two-line report.
Objectives
report.txtexists- Line 1 matches
Date: <today> - Line 2 matches
Files in supplies: <count>