Archive for December, 2011

word frequency count

Sunday, 25 December 2011

cat {file} |tr [:upper:] [:lower:]\
| sed ’s/[^[:alpha:]][^[:alpha:]]*/\
/g’ | sort | uniq -c| sort -r |more

note that a new line is explicitly included in the sed via the line break. . .

thanks to Daniel Fackrell for the inspiration