News for hackers. Stuff that matters.
Re:Top Unix Command Line Utilities by tomaac on Sunday December 30, 2012 @11:30AM (#4986163)
Combine sort and uniq is useless since sort has already -u flag.
Re:Top Unix Command Line Utilities by nieve on Monday December 31, 2012 @01:09AM (#4988577)
Except for those cases where you want counts, only unique/only duplicate, skipping fields, doing case-insensitive duplicate detection, or only comparing a chunk of the line - all but the last two I've used and now that I've found those in the man page (GNU uniq) I can replace some silly shell hacks that I've used over the years. It's like saying that tail is pointless unless you're doing tail -f... you're missing the actual useful functionality due to presuming the tool only does what you've done with it in the past.
Re:Top Unix Command Line Utilities by etrain on Sunday December 30, 2012 @07:26PM (#4987710)
sort | uniq -c | sort -n

is something I use all the time to get sorted frequency tables.

Re:Top Unix Command Line Utilities by etrain on Sunday December 30, 2012 @10:19PM (#4988218)
And, by the way, the two commands are something that could be done in O(n), rather than O(n*log(n)) - but this little procedure is so damn easy to write, that on relatively thin inputs that are less than 20m lines long, I usually just do this.