I am beginner in AWK, so please help me to learn it. I have a text file with name snd and it values are
1 0 141
1 2 223
1 3 250
1 4 280
I want to print the entire row when the third column value is minimu
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This should do it:
EDIT:
What this does is:
Note that the test
NR > 1can be skipped, as for the 1st line,$3 < minwill be false. If you know that the 3rd column is always positive (not negative), you can also skip theNR == 1 ...test asmin‘s value at the beginning of the script is zero.EDIT2:
This is shorter: