Loading
0x1A0Lesson 27 of 28

Mission: the sabotage mystery

Someone sabotaged the reactor overnight. Use the shell to find out who.

25 min 4-question quiz 1 code exercise
By the end of this lesson you can
  • 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 XP

Who 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.

/home/crew/evidence
  • doors
    • access.log
  • interviews
    • statements.txt
  • notes
    • briefing.txt
  • personal
    • dennis
      • grace
        • journal.txt
    • systems
      • badges.csv
      • reactor-control.log
    Up arrow: history. Tab: complete. Ctrl-L: clear. Ctrl-C: cancel.
    1. Who was near the reactor?
    2. Who entered the control room?
    3. Catch the lie
    4. Match the token
    5. 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.

    Exercise 1

    The night shift report

    +25 XP

    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
    script.sh
    Loading editor…

    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…