You stand at the edge of the Rift β€” a swirling chasm where data streams collide. The rules here are different: commands don’t just run, they flow into each other. Master the pipe and you master the dungeon.

🎯 Quest Objectives

�️ Quest Prerequisites

All of these should be in your inventory before entering the Rift:

⚑ Command Cheatsheet

Syntax What It Does
cmd1 \| cmd2 Pipe stdout of cmd1 to stdin of cmd2
cmd1 && cmd2 Run cmd2 only if cmd1 succeeds (exit 0)
cmd1 \|\| cmd2 Run cmd2 only if cmd1 fails (non-zero exit)
cmd1 ; cmd2 Run cmd2 always, regardless of cmd1 exit
cmd > file Redirect stdout to file (overwrite)
cmd >> file Redirect stdout to file (append)
cmd 2> err.log Redirect stderr to file
cmd 2>&1 Redirect stderr to same destination as stdout
cmd > out.log 2>&1 Redirect both stdout and stderr to file
cmd \| tee file Print to terminal AND write to file

πŸ—ΊοΈ Walkthrough

Step 1 β€” Assemble the Rift Key

# The Rift gate requires all four fragments
ls -F
# arena/  rift_gate  key_assembler*

inventory
# stone key fragment, tome fragment, vault key fragment, portal crystal βœ“

./key_assembler
# All fragments combined β†’ Rift Key obtained.

Step 2 β€” Arena β€” Master the pipe

cd arena
ls -F
# combatants  scoreboard  arena_boss*

cat combatants | sort | uniq
# Unique combatant list, sorted alphabetically

cat combatants | grep "elite" | wc -l
# Count of elite combatants

# Engage the arena boss
./arena_boss

The arena boss asks pipe-based puzzles. Answer by constructing the right pipeline.

Step 3 β€” Pit β€” Command chaining

cd ../pit
cat instructions
# "Raise the drawbridge ONLY if the watchtower lights up. Fail gracefully."

./watchtower && ./raise_drawbridge
# If watchtower succeeds: drawbridge raised.
# If watchtower fails: drawbridge untouched.

./watchtower || echo "Watchtower failed β€” lighting torches instead."

./pit_boss

Step 4 β€” Spire β€” Redirection

cd ../../spire
cat spire_challenge
# "Capture all output from the oracle β€” both wisdom and errors β€” into oracle.log"

./oracle > oracle.log 2>&1
cat oracle.log

# Also capture with tee so you still see it:
./oracle 2>&1 | tee oracle.log

Step 5 β€” Mezzanine β€” Advanced chaining

cd mezzanine
# Combine all techniques:
ls -la | sort -k5 -rn | head -10 > biggest_files.txt
cat biggest_files.txt

Step 6 β€” Hidden areas: .elevator and .satellite

ls -a
# .  ..  .elevator/  .satellite/

cd .elevator
ls -F
# control_panel  floor_select*

./floor_select
cd ../.satellite
ls -F
# transmitter*  signal_logs  satellite_boss*

cat signal_logs | grep "ERROR" | tee error_report.txt
cat error_report.txt

./satellite_boss

The satellite boss is the final encounter. It uses all skills: pipe a command through grep, redirect errors, chain with &&. Complete it to finish the dungeon.

πŸ’‘ Common Pitfalls

Problem Cause Fix
| not working Wrong pipe character Use \| in tables; actual \| is just | in shell
2>&1 must come AFTER > Order matters Always: > file 2>&1 not 2>&1 > file
&& chain stops early A command failed Add \|\| fallback or check exit codes
Hidden dirs not found Forgot ls -a Always use ls -a in unfamiliar directories

βœ… Validation

➑️ Next Steps


πŸ“š External Resources

Continue your terminal adventure with these resources:


The Rift closes behind you. The dungeon is conquered. Every command a spell β€” every pipe a portal. πŸŒ€βš”οΈβœ¨