News for hackers. Stuff that matters.
Re:Erik Meijer: The World According to LINQ by epistasis on Saturday September 03, 2011 @04:56PM (#2958090)
My apologies for being pedantic, but that's not quite right, to do something similar you'd need

  sed 's/ \+/\n/' words.txt | tr A-Z a-z | sort | uniq -c 
And to get the top five, you'd need another sort:

  sed 's/ \+/\n/' words.txt | tr A-Z a-z | sort | uniq -c | sort -gr | head -5
Where the delimiters of interest go where the space is in the sed expression. Of course, I can never remember what strange regex syntax sed uses, so I have spend 5 minutes trying to puzzle through man page.

There are no comments on this comment yet.