I have data in a .txt like this:
2 40
1 50
1 50
1 50
1 50
2 70
2 70
5 80
5 80
6 100
And I want to sum first column if the second column's rows match so I can get an output like this:
2 40
4 50
4 70
10 80
6 100
Thanks in advance!