echo -e "55 11\n25 11.0" | awk '$2 ~ /11/{print $1}'
I only want to match “11”, and not “11.0”‘s value 25. Any tips?
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.
Match the whole field:
If you did want to match numerically, you should not use a regular expression, of course (your current one would also match 6119.42):