|
From: | Matthew Woehlke |
Subject: | Re: Feat-Req: uniq -c delimiter should be changable |
Date: | Mon, 09 Jun 2008 11:42:17 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.14) Gecko/20080501 Fedora/2.0.0.14-1.fc8 Thunderbird/2.0.0.14 Mnenhy/0.7.5.0 |
Maximilian Haeussler wrote:
Let's say I only want the 50 most common lines of a file: cat textfile | sort | uniq -c | sort -n | tail -n 50 | tr -s ' ' | cut -f2
Have I ever mentioned that 'sort | uniq -c' really ought to be folded into sort proper? (Not to get rid of 'uniq', but 'sort | uniq -c | sort -n' is far less efficient than a good tree algorithm... which is exactly why I wrote such a critter. When analyzing the output of 'strings' on a multi-GB core file, it makes a WORLD of difference...)
-- MatthewSomewhere, there is a .sig so funny that reading it will cause an aneurysm. I haven't found it yet, but I think I met a few of the runners-up.
[Prev in Thread] | Current Thread | [Next in Thread] |