James Youngman wrote:
On 5/21/07, Matthew Woehlke <[EMAIL PROTECTED]> wrote:
Is there an efficient implementation of 'sort | uniq -c | sort -n'? I
have a 4 GB core file I want to run 'strings' on, and the above is
really slow.

I would suggest that the appropriate factorisation would be

countitems | sort -n

Here, countitems could be "sort" with some options or "uniq" with some
options...

I thought about that, but /maximum/ efficiency is only achievable doing everything in one go. Anyway I think 'countitems' would still be a big improvement; I would do that as 'sort --unique-with-count' (preferably aliased 'sort -U') since IMO this is a missing feature of 'sort -u'.

--
Matthew
When in doubt, duct tape!



_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to