http://www.perlmonks.org?node_id=250395


in reply to speed up one-line "sort|uniq -c" perl code

you would gain a speed by using lesser processes in your bash one liner,instead of "sort |uniq":
sort -u
try to use nl for the line number:
sort -u | nl -ba
Update: bad answer .. this question was not asked .. thx Aristotle

Replies are listed 'Best First'.
Re^2: speed up one-line "sort|uniq -c" perl code (not the OP's question)
by Aristotle (Chancellor) on Apr 14, 2003 at 20:27 UTC
    Uhm, he's not at all interested in a line number, what he wants is an occurence count per word.

    Makeshifts last the longest.