910 B
910 B
type, title, xp, duration, difficulty
| type | title | xp | duration | difficulty |
|---|---|---|---|---|
| challenge | The Reader | 50 | 30 | 2 |
The Reader
[INCOMING — Mission Control, Earth]
Cadet, an old mission log was recovered. We need three things from it.
When your script runs,
mission-log.txtis sitting in the working directory. Pull these out:
- The first 5 lines → save to
first-five.txt- The last 3 lines → save to
last-three.txt- The total line count → save to
line-count.txtThree commands:
head -n N file— first N linestail -n N file— last N lineswc -l file— count lines[END TRANSMISSION]
Your Task
In starter/starter.sh, produce the three output files using head,
tail, wc, and redirect.
Objectives
first-five.txtmatches the first 5 lines of the loglast-three.txtmatches the last 3 lines of the logline-count.txtcontains the line count