I have a datafile:
data1:1,2,3,4
data2:434,434,233,7
data3:23,44,76,334
data4:4,6,55,8
data1:6,76,45,09
data5:45,43,343,2
data2:3,43,5,5656,5
I am using awk with input field separator as ":"
I want to concatenate field 2 of every record that has the same field
1.
The final contents of the processed file should look like:
data1:1,2,3,4,6,76,45,09
data2:434,434,233,7,3,43,5,5656,5
data3:23,44,76,334
data4:4,6,55,8
data5:45,43,343,2
Any guidance is highly appreciated.


|