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!