I have this structure:
col1 col2 col3 col4 col5
27 xxx 38 aaa ttt
2 xxx 38 aaa yyy
1 xxx 38 aaa yyy
I need to collapse duplicate lines ignoring column 1 and add values of duplicate lines (col1) so it will look like this:
col1 col2 col3 col4 col5
27 xxx 38 aaa ttt
3 xxx 38 aaa yyy
I'm using uniq -c -f1 but it doesn't help with the addition of the numbers in the first column:
1 col1 col2 col3 col4 col5
1 27 xxx 38 aaa ttt
2 3 xxx 38 aaa yyy
Could you please help me with this?
Thank you!