This question already has an answer here:
I would like to sum numerical values listed in the third column of the table below based on entries were given in the first column of the same table. The table content is as follows:
John|Login|2 Mary|Login|10 Mary|Payroll|100 John|Login|200 John|Logout|10 Mary|Payroll|10
The expected outcome is as follows:
John|Login|202 John|Logout|10 Mary|Login|10 Mary|Payroll|110
How can I use
awk to get this output?