Hello to the experts! I have a file that I'd like to collapse based on a common ID column, separated by a character delimiter.
example input
a 1 6 word1 uniq1
b 2 7 WORD2 uniq2
b 2 7 WORD2 uniq3
b 2 7 WORD2 uniq4
c 3 8 word4 uniq5
d 4 9 word5 uniq6
e 5 1 word6 uniq7
desired output
a 1 6 word1 uniq1
b 2 7 WORD2 uniq2;uniq3;uniq4
c 3 8 word4 uniq5
d 4 9 word5 uniq6
e 5 1 word6 uniq7
Note that column 4 contains the ID used to collapse, and column 5 are the strings to actually collapse with the delimter ";"
Help is sincerely appreciated!
Many thanks.