A;100;Paris;City;10;0;0
A;100;Paris;City;0;10;0
A;100;Paris;City in Europe;0;0;20
B;101;London;City;20;0;0
B;101;London;City;0;20;0
B;101;London;City in Europe;0;0;40
I need to group the above lines to:
A;100;Paris;City in Europe;10;10;20
B;101;London;City in Europe;20;20;40
You could use awk with semi-colon as the field separator. Can't actually write this for you without full info about the data.... I could take guesses... you could post your assignment sheet (betting that this is for school).