I want to count all the records in a table through awk but NR prints record nos of all records not the total count. I even tried:
NF==4,count++{print count}
But its not working properly
How can I do it through awk?
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.
Please show a sample of your file and what you want to do with it (show the desired output ) next time. Just guessing what you want,
the total number of records is indicated by NR.
the total number of records currently is denoted by FNR.