Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by maksl (Pilgrim)
on Apr 14, 2003 at 19:46 UTC ( #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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2023-03-30 07:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (73 votes). Check out past polls.

    Notices?