> You can count the words by leaving the spaces in, with 'wc -w': > > $ cat testfile.txt | tr -d "[:punct:]0-9" | wc -w > 9 I think the "tr -d ..." might not be necessary in the case where you're counting words. At least, on my system, wc appears to deal with punctuation properly. $ cat test.txt Hi there. How the-heck are you? $ wc -w test.txt 6 test.txt