DevOps and cloud

Stage 1 · Lesson 6 of 10

Pipes, grep, sed and awk

Linux, the shell and scripting

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

Practise

Keep handy

  • The handful of flags people actually use for each command, one line each

Also worth your time

Mark this stage as not done?