combine (224B)
1 #!/usr/bin/awk -f 2 # Add all the same symbols together, for example 3 # 4 # VB 1 5 # VB 1 6 # 7 # would become 8 # 9 # VB 2 10 11 { 12 IFS = " " 13 OFS = IFS 14 amounts[$1] += $2 15 } 16 17 END { 18 for (amount in amounts) 19 print amount, amounts[amount] 20 }