My input is the following sorted CSV file (using : as the field delimiter instead of the usual comma):
version:device
1.0.0:dev1
1.0.0:dev2
1.2.3:dev3
1.3.4:dev4
1.3.4:dev5
I want to aggregate it so that each version is in 1 line:
version:devices
1.0.0:dev1,dev2
1.2.3:dev3
1.3.4:dev4,dev5
version, or according todevice(i.e. can the same value forversiononly appear in consecutive lines, or can a previously encountered value re-appear after lines with differentversion)?devicetodevicesin the first line of output.