I'm trying to take a table like this:
a b hello a b goodbye g g test a c I say
to collapse the table down to one row per unique entry on column 1 and 2, but without losing any of the info in column 3. The values in column 3 could get appended as a comma-delimited list. The result would look this:
a b hello, goodbye a c I say g g test
I'm out of my element figuring out where to begin. Using
sort -k1,1 -k2,2 -u, I get the following result:
a b hello a c I say g g test
I've lost the entry for "goodbye", but I'd like to keep it. Does anyone know how to avoid throwing away the data in column 3, as in the above example?