I use this about twice a week and never see anyone else use it. awk -F, '{s[$1]+=$2} END {for (k in s) print k, s[k]}' data.csv Add | sort -k2 -n for ranked output. It breaks on quoted commas, so it's only for data you control. If the file has a header, NR>1 in front of the block.