Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Re: Counting lines by content

by broquaint (Abbot)
on Oct 09, 2002 at 11:45 UTC ( [id://203898]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Counting lines by content
in thread Counting lines by content

This will count the second field ignoring duplicates
perl -F: -e 'END { print "$_ $c{$_}\n" for keys %c }' \ -ane '$c{$F[1]}++ unless $d{"@F[1,2]"}++'
I assume this is what you meant no duplicates in the third field.
HTH

_________
broquaint

Replies are listed 'Best First'.
Re: Re: Re: Re: Counting lines by content
by willa (Acolyte) on Oct 09, 2002 at 13:03 UTC
    Thanks! Works a treat!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-03-29 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found