AptLynx

Command-line tool

gawk

brew/gawk

Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev

GNU awk utility

At a glance

Type
Command-line tool
Install on
macOS, Linux
Last checked
25 Oct 2026, 21:09 UTC

Install it

macOS

brew install gawk

Linux

brew install gawk

Print the fifth column (a.k.a. field) in a space-separated file

gawk '{print $5}' path/to/file

Print the second column of the lines matching a pattern in a space-separated file

gawk '/pattern/ {print $2}' path/to/file

Print the last column of each line in a file, using a comma (instead of space) as a field separator

gawk -F ',' '{print $NF}' path/to/file

Related command-line tools

Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents