fork download
BEGIN {FS=", *"}
{sum[$2]+=$1 }
! country[$2] && $3 != "" {country[$2] = $3}
END { for ( k in sum ) { print sum[k] "," k "," country[k] } }
Success #stdin #stdout 0.01s 4276KB
stdin
17, 69.175.54.106,
283, 69.175.54.106, US
77, 58.77.59.10, CN
23, 58.77.59.10, 
stdout
100,58.77.59.10,CN
300,69.175.54.106,US