[SLL] grep and wc help needed

Ralph Sims ralph at sims.cc
Sat Feb 21 13:25:57 PST 2009


(or perl, or ...)

I have a text file that contains alpha characters as well as puncuation 
parks.  I tried grep [:alpha:] filename |wc but still get the punction 
marks counted.  I've also used [aZ-zZ] and still get the same result.  
What I'm looking for is a way to count the letters and words in a file 
without punctuation, spaces, etc.

Thanks in advance.


More information about the linux-list mailing list