Python solution (quick and dirty version):

=============================================

import sys
words = [line.strip() for line in open(sys.argv[1])]
[ sys.stdout.write(line.strip() + ': ' + str(words.count(line.strip()))\
+ '\n') for line in open('/usr/share/dict/american-english') if line.strip() != '' and\
 words.count(line.strip()) > 0 ]


/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to