Thus said Andy Bradford on Fri, 10 Mar 2006 18:05:49 MST:
> Here's my quick and dirty one-liner in shell:
>
> for I in `strings filename.txt`; do blah=`echo $I | sed -e 's/[^a-zA-Z]//g'
> -e '/^$/d'`; if grep "^$blah$" /usr/share/dict/words; then echo $blah; fi;
> done | awk '{ a[$1]++ } END { for (b in a) printf("%-15s %6d\n", b, a[b]); }'
Did I mention this was dirty? strings apparently cannot be used in this
fashion since it is only meant for non-text files. Back to the drawing
board.
Andy
--
[-----------[system uptime]--------------------------------------------]
6:20pm up 105 days, 7:49, 1 user, load average: 0.00, 0.00, 0.00
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/