> ## Content Index
> Fetch the complete content index at: https://kudithipudi.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# HOW TO : Use awk to print values larger than certain number
- URL: https://kudithipudi.org/how-to-use-awk-to-print-values-larger-than-certain-number/
- Published: 2015-08-24T20:40:27.000Z
- Updated: 2015-08-24T20:40:27.000Z
- Description: Quick how to on using awk to filter results if a certain value (column) is larger than a set value. For example, if you have a...
- Author: admin
- Tags: HOWTO, Linux, Technology, Uncategorized, awk, greater, howto, linux, tips, #wp, #wp-post, #Import 2026-08-23 02:32

Quick how to on using awk to filter results if a certain value (column) is larger than a set value.

For example, if you have a file (servers.txt) with lines in this format

a\_datacenter, servers 20  
 error, servers xyz  
 b\_datacenter, servers 21  
 c\_datacenter, servers 50

and you want to show only the lines that have server value larger than 20, you can do this in awk by running

grep datacenter servers.txt | awk '$3 > 20 {print ;}' | more

breaking down the commands

**grep** – parsing down the output to just show the lines containing datacenter

**awk** – $3 > 20 : Get the third variable (awk seperates text using spaces by default) and check if it is greater than 20

**print** – print the entire line