>_ IzzyLab

Topic breakdown

In awk you can put a pattern-condition before the action: the action runs only for lines where the condition is true. And if you omit the action entirely, awk prints the whole line ($0) by default — so the "keep matching lines in full" filter is expressed by a single pattern with no action block. Fields in the condition are compared as numbers, so here it's enough to compare the right column with a threshold; the result is redirected to a file.

What's checked

  1. /root/hot.txt has only lines with third field > 100

What it looks like