Stage 1 · Lesson 6 of 10
Pipes, grep, sed and awk
The 's real power is joining small tools with . A pipe, the | character, sends the output of one command into the next. grep finds lines that match a pattern.
sort puts lines in order and uniq -c counts repeats. cut and awk pull out columns, and sed edits text as it flows past. Redirection with > and >> saves results to a file.
Together they answer questions like "which ten made the most requests?" in one line: awk '{print $1}' access.log | sort | uniq -c | sort -rn | head. This is how you dig through logs on a server before any dashboard exists. It is also the heart of most .
Common trapwriting a long, clever one-liner nobody can read; once a pipeline needs comments, make it a script.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
Shell, scripting, data wrangling, SSH and Git in a dozen focused lectures
- BookFreeThe Linux Command Line
William Shotts · Beginner
Free book: permissions, processes, packages and longer shell scripts, chapter by chapter