NCAE Mapping Hub
Overview Scoreboard Data Roles Exercised Checklists Lessons Skill Drills Practice Terminal Progress
performance medium Apply command-substitution 2 points

Question 45. CSCD240-E1-A

Print "Backup taken on <today>" using $(date +%Y-%m-%d) as the date.

Work the drill

Answer on paper or in a terminal before revealing the ideal answer.

Ideal answer
echo "Backup taken on $(date +%Y-%m-%d)"
Acceptable alternatives: ["echo \"Backup taken on `date +%Y-%m-%d`\""]

Misconception bank

Each row below is a plausible wrong answer, the thinking that produces it, and the remedy that corrects the misconception. These are the foundation of the multiple-choice framing and the targeted feedback a student receives after answering.

echo 'Backup taken on $(date +%Y-%m-%d)'
Misconception. Single quotes prevent substitution — prints literal.
Remedy. Double quotes REQUIRED for $() expansion.
echo Backup taken on $(date +%Y-%m-%d)
Misconception. Works but spaces inside echo are fragile; accept.
Remedy. No quotes works here because no multi-word substitutions. But habitually quote.

Authority mappings

Hover any chip for the mapping justification; click to open the authority record.

DCWF tasks: T0498
KU outcomes: CD-BSP-O1CO-M5-O2
KU topics: CD-BSP-T8a

Course-artifact links

Lectures

  • CSCD240-S26-L05. Permissions part 1: ls -l anatomy, rwx, file types

Lab questions

  • CSCD240-S26-LAB5: Use $(date +%F) inside a string. Also demonstrate backticks.

CTF challenges

  • 04 Environment & Patterns: Capture the Output
  • 04 Environment & Patterns: Its a trap