sed & awk for Text Transformation
Intermediate · 30 minutes · 100 points
Master two of Linux's most powerful text-processing tools — sed and awk. In this hands-on lab you will manipulate real-world style log and CSV files using stream editing, pattern matching, field extraction, and report generation. By the end you will be able to confidently transform, filter, and summarise structured text data entirely from the command line.
What you’ll learn
- Use sed to perform in-place substitutions, deletions, and multi-expression transformations on text files
- Use awk to extract specific fields, filter rows by pattern, and compute aggregated statistics
- Combine sed and awk in a pipeline to produce a clean, formatted report from raw log data
How this lab works
- Start the lab: One click starts a container on your computer with a real terminal: nothing to install by hand, nothing to clean up.
- Work through 3 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work runs each task’s checks in your container and says what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: A container on your computer, with a real terminal
- Image: ubuntu:22.04
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop installed and running
Topics: sed, awk, text-processing, linux, cli, log-analysis, bash, pipelines
Create a free account to start this lab.