awk
Pattern-directed scanning and processing language.
Syntax
$awk 'PROGRAM' [FILE]
Examples
Examples
$awk '{print $1}' file.txt
Examples
$awk -F':' '{print $1}' /etc/passwd
Typical use cases
awk '{print $1}' file.txt
awk -F: '{print $1}' /etc/passwd
awk '$3 > 1000 {print $1}' /etc/passwd
Note
Strong for columnar data and one-liner reporting tasks.
Export