Hi, I need to write an awk script that would count the words in a file and print the result. I don't know what kind of command would do that.
I am a beginner and I could really use some help.
Thank you.
Thanks for answering so quickly.
The wc -w command works fine, it's just not exactly what I need.
In fact, I need to count the number of words in a file, ignoring the lines that begin with ";" .
Thanks again.
the last one works just fine.
Now, I am still trying to change this one: grep -v "^;" filename | wc -w ,the one i got from user PHV (Thank you!) I want it to ignore the lines that begin with ";" .
Could use some help.
Thanks a lot.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.