September 22, 2015

Using awk to filter by value



Here's a simple example of an awk script that will find rows where there value is greater than 1000. I often forget the syntax of this command but in the following example, I'm trying to find rows where the 11th column is greater than 1000.

awk '{if ( int($11) >= 1000 ) print $7, $11;}'

No comments: