Mission 12

Text pipelines

Use safe simulated pipes to count, sort, and deduplicate text output.

Text and logs
9 minutes Beginner Lesson 12 of 360
echosortuniqwc
Lesson 12 of 360 0/360 lessons 0/17 missions Text and logs · 9 minutes
0%
Continue View profile
Ops lab terminal Training lab
New learnerrank 0XP 0%complete
learner@clairos:/home/learner $ Unix ops lab: type a command, press Enter
Instructions 9 minutes

Click any instruction for the command details, the why, and the common mistake to avoid.

Count piped words

Run echo alpha beta beta | wc.

echo alpha beta beta | wc
Sort and dedupe

Run cat /home/learner/data/ports.txt | sort | uniq.

cat /home/learner/data/ports.txt | sort | uniq
Write a safe note

Run echo pipeline-practice > lab-pipeline.txt.

echo pipeline-practice > lab-pipeline.txt
Lesson support

What to notice while you play.

Objective

Understand how one command's output can become another command's input.

Hint

Use echo with quoted words before trying cat with a pipe.

Why it matters

Pipelines make terminals powerful, but this lab keeps them tightly limited.

Common mistakes
  • Trying shell operators that are not part of the simulator.
  • Expecting pipes to run arbitrary programs.
Reference

Commands in this lesson.

echo <text>

Print text or write lab notes with >.

wc [-l] <file>

Count lines, words, and characters.

sort|uniq

Practice simple text pipelines.