Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: speed up one-line "sort|uniq -c" perl code

by maksl (Pilgrim)
on Apr 14, 2003 at 19:46 UTC ( [id://250395]=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://250395]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-15 01:59 GMT
Find Nodes?
    Voting Booth?

    No recent polls found