Process and transform text files quickly with concise patterns and actions. 21.02.2026 | reading time: 2 min awk is a compact programming language and command-line tool for scanning and transforming text data; learn to extract fields, compute aggregates and rewrite reports in a few terse lines. CSV summarizer Create a sample file and run awk to sum salaries by department: ``` Name,Dept,Salary Alice,engineering,70000 Bob,marketing,55000 Charlie,engineering,80000 Dana,marketing,60000 ``` Then run: ``` awk -F, 'NR>1 {sum[$2]+=$3} END {for (d in sum) print d, sum[d]}' employees.csv ``` Possible output: ``` engineering 150000 marketing 115000 ``` Power features Try BEGIN and END blocks for headers and summaries, use `-F` or `FS` to change field separators, employ associative arrays for grouping, and prefer `printf` for formatted reports; `-v` lets you pass shell variables into scripts for reproducible automation. When awk is the right tool Use awk for column-oriented parsing, quick one-liners in pipelines, or small report generators; choose a full script with `-f` for complex logic and avoid awk when you need heavy JSON handling or libraries better served by Python or Perl. Next steps Practice by converting logs and CSVs, chain awk with pipes, and write small awk scripts to automate daily tasks; deepen Linux expertise and consider formal certification such as CompTIA Linux+ or LPIC-1 with intensive exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. scripting utilities filesystem