title: Use AWK to print lines that have a certain string followed by a number greater than 10000
body: <p>I have a file that looks something like this:</p>
  
  <pre><code>column1 column2 column3 column4 column5 column6 Warn=3000
  column1 column2 column3 column4 column5 Warn=200
  column1 column2 column3 column4 column5 column6 column7 Warn=40000
  column1 column2 column3 column4 Warn=100
  column1 column2 column3 column4 column5 Warn=20000
  column1 column2 column3 column4 Warn=15000
  </code></pre>
  
  <p>As it can be seen, the number of fields is changing on each line, but the last field is always "Warn=" followed by a number.
  I basically want to print all the lines where the "Warn=" string is followed by a number greater than 10000 and sort them from highest number to lowest. </p>
  
  <p>So the result should look like this:</p>
  
  <pre><code>column1 column2 column3 column4 column5 column6 column7 Warn=40000
  column1 column2 column3 column4 column5 Warn=20000
  column1 column2 column3 column4 column5 Warn=15000
  </code></pre>
  
  <p>So far I've been able to somewhat achieve what I want by using grep, awk and sort:</p>
  
  <pre><code>grep -E 'Warn=[0-9]{5}' file.txt | awk '{ print $NF, $0 }' | sort -rn -k1 | sed 's/Warn=[0-9]* //'
  </code></pre>
  
  <p>Is there an easier way of doing it just with awk?</p>