merging line and adding number
I having file below o/p
ibapp311dg,,20480,s,,,,,,,,,
test,,20480,s,,,,,,,,,
test,,20480,s,,,,,,,,,
ibapp311dg,,20480,s,,,,,,,,,
I want to to chk unique word line in the first field seperated by , as well as addup corressponding the number in field for each unique word like
ibapp311dg 40960
test 40960
please help