0

I have File 1 (tab delimited):

ALI 1987 
ALI 2015 
ADAM 368 
ADAM 659 
JILL 123c.56 
JILL 78p.rs_896

And I would like to get File2:

ALI: 1987, 2015
ADAM: 368,659
JILL: 123c.56, 78p.rs_896

I know how to revert columns to rows only for $2:

awk '{printf ("%s,",$2)}' File1

But How could I create condition for $1 only uniqe first? Thank you

Vonton
  • 2,872
  • 4
  • 20
  • 27
  • 4
    Possible duplicate of [Join lines with the same value in the first column](https://stackoverflow.com/questions/19823941/join-lines-with-the-same-value-in-the-first-column), or [join all lines that have the same first column to the same line](https://stackoverflow.com/questions/32623035/join-all-lines-that-have-the-same-first-column-to-the-same-line) – Wiktor Stribiżew Sep 10 '19 at 11:15
  • 1
    See https://ideone.com/0XVbJT, based on [this](https://stackoverflow.com/questions/32623035/join-all-lines-that-have-the-same-first-column-to-the-same-line) – Wiktor Stribiżew Sep 10 '19 at 11:37

0 Answers0