Back to labs/answer key page

The version of freq we've created here counts words as distinct if they start with a capital letter, or have punctuation on the end. Typing man tr will provide the `man' (manual) page on tr. Many unix commands have manual pages. If man doesn't work, try info.

Here is a more advanced version of freq, stored in /usr/local/bin/freq so that anyone can use it just like other unix commands.

tr -sc A-Za-z\' '\012' < $1 | tr A-Z a-z | sort | uniq -c | sort -nr | less 

Back to labs/answer key page

-----

Emily M. Bender
Last modified: Fri Dec 8 12:04:39 2000