Mission: the sabotage mystery
Someone sabotaged the reactor overnight. Use the shell to find out who.
- Combine grep, sort, find and pipelines to investigate a real question
- Cross-check evidence from several files
- Back up a conclusion with the commands that prove it
02:14, Kestrel Station. The alarm wakes you. Someone disabled the reactor’s coolant pump overnight, and the station is on backup power. Commander Hopper is at your door.
“Six people could have reached the reactor. I need to know who did it, and I need proof. Everything we have is on the evidence server. You’re the only one here who can read it.”
Try it
Up to 15 XPWho sabotaged the reactor?
Everything you’ve learned applies here. There’s no single right command, so use whatever gets you there. Start with ls and cat notes/briefing.txt. Give each answer by typing answer, then your reply.
Mission 1 of 5
Who was near the reactor?
Hopper: “How many separate door scans were there at the reactor, not counting the control room?”
Simulated shell. Try ls, or type help to see the commands.
- doors
- access.log
- interviews
- statements.txt
- notes
- briefing.txt
- personal
- dennis
- grace
- journal.txt
- dennis
- systems
- badges.csv
- reactor-control.log
- Who was near the reactor?
- Who entered the control room?
- Catch the lie
- Match the token
- Find the motive
Key takeaways
Use grep to narrow things down, and then cross-check sources.
Substring matches can quietly give you the wrong answer.
find shows hidden files that ls doesn’t.
Lesson quiz
4 questions · pass with 3 correct · up to 50 XP
Passing this quiz completes the lesson and keeps your streak going. Questions you miss come back in review sessions later.
Practice: write Bash scripts
Write a script in the editor and run it for real against sample input. Each run gets a fresh Linux sandbox with Bash 5.2 and the GNU tools on Wandbox, a free public service - so experiment freely, even with rm. Your script and test input are sent there.
The night shift report
stdin is a door log of TIME ROOM NAME lines. Print how many scans each person made, most first, with ties in alphabetical order, as NAME COUNT. Then print suspect: NAME, the person who scanned into reactor-control.
- Finds the suspect
Your script runs with Bash 5.2 and GNU tools on Wandbox, a free public service, in a fresh sandbox each time. Your script and test input are sent to that service.
Questions about this lesson
Stuck? Ask. Figured something out? Share it. Explaining is one of the best ways to learn.
Loading posts…