1*9a7741deSElliott HughesBEGIN { FS = "\t" } 2*9a7741deSElliott Hughes { pop[$4 ":" $1] += $3 } 3*9a7741deSElliott HughesEND { for (cc in pop) 4*9a7741deSElliott Hughes print cc ":" pop[cc] | "sort -t: -k 1,1 -k 3nr" } 5