Sample Program Go forward to Bugs . Go backward to Gawk Summary . Go up to Top .
Some explanations follow the program listing.
The first rule, because it has an empty pattern, is executed on every line of the input. This means that punctuation characters count as part of words. This is undesirable since in normal text, words are capitalized if they begin sentences, and a frequency analyzer should not be sensitive to that. The output does not come out in any useful order. You're more likely to be interested in which words occur most frequently, or having an alphabetized table of how frequently each word occurs.