#!/usr/bin/awk -f BEGIN { k="" v=0 } { if (k!=$1) { if (k!="") { print k, v } k=$1 v=0 } v=v+$2 } END { print k, v }