Mission 218

Awk service summary

Extract service names from a baseline report.

Text and logs
8 minutes Admin Lesson 218 of 360
awkcut
Lesson 218 of 360 0/360 lessons 0/17 missions Text and logs · 8 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 8 minutes

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

Print baseline first field

Run awk '{print $1}' data/baseline.txt.

awk '{print $1}' data/baseline.txt
Extract values

Run cut -d = -f 2 data/baseline.txt.

cut -d = -f 2 data/baseline.txt
Count baseline lines

Run wc -l data/baseline.txt.

wc -l data/baseline.txt
Lesson support

What to notice while you play.

Objective

Extract service names from a baseline report.

Hint

Run the commands in order and compare the outputs.

Why it matters

Junior operators build confidence by gathering evidence before changing systems.

Common mistakes
  • Skipping the inspection step.
  • Assuming one command tells the whole story.
Reference

Commands in this lesson.

awk '{print $N}' <file>

Print a whitespace-delimited field.

cut -d <char> -f <n>

Extract delimited fields from text.