#158 Filtering content from files based on field value using awk

Request to print lines which has value in field #3 larger than 999:

awk -F":" '$3 > 999 ' /etc/passwd

Request to print lines which has value in field #3 smaller than 101:

awk -F":" '$3 < 101 ' /etc/passwd

Discover more from Tips and Hints for Aerospace Engineers

Subscribe now to keep reading and get access to the full archive.

Continue reading