I have a data stream as following:
A,1
A,3
B,4
B,2
C,1
D,5
... and so on. I want to merge lines based on column 1 after adding the values in column 2. So it's supposed to look like this:
A,4
B,6
C,1
D,5
It looks like a typical MapReduce job but I want to know if there is any command/ bash tool to do this task probably in one or two lines. The file size I'm working with is hardly 3-4 KB.