Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • That is, benchmark=30;grep "Waiting for timer" wk.txt | awk -vbenchmark=$benchmark '$6 > benchmark' | wc -l is the same as grep "Waiting for timer" wk.txt | awk -v threshold=30 '$6' , which is not returning anything other than a simple grep "Waiting for timer" wk.txt for me. Strange. Commented Dec 10, 2014 at 10:51
  • @Sree Well, your input data might be such. The awk code is checking if $6 is greater than the assigned value of benchmark, and your example case has $6 > 30. (Any string starting with alphabets will be greater than "30", (or a any string composed only of digits).) Commented Dec 10, 2014 at 10:55
  • Makes sense now. The comparison with 30 matches with the purpose of the script. By the way Murukesh, the speed at which you jump from 1000 to 2000 to 3000 is amazing. Keep it up :) Commented Dec 10, 2014 at 11:35