๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

๐Ÿ“œ Shell Scripting April 23, 2026 13

Linux Command: awk

Pattern-scanning and text-processing language โ€” the Swiss Army knife of shell pipelines

Terminal โ€” Shell Scripting
Command
$ ps aux | awk '$3 > 50.0 {print $2, $11}'
Output
(prints PID and command of processes using >50% CPU)

awk processes text line-by-line with powerful pattern matching and field extraction. Built-in variables: $0 (whole line), $1..$N (fields), NR (row number), NF (field count). For complex logic, full programs with BEGIN/END blocks, loops, and associative arrays.

Share this tip