awk/sed/bash to merge/concatenate data

Posted by Kyle on Stack Overflow See other posts from Stack Overflow or by Kyle
Published on 2010-04-30T23:05:01Z Indexed on 2010/05/02 5:07 UTC
Read the original article Hit count: 257

Filed under:
|
|
|

Trying to merge some data that I have. The input would look like so:

foo bar
foo baz boo
abc def
abc ghi

And I would like the output to look like:

foo bar baz boo
abc def ghi

I have some ideas using some arrays in a shell script, but I was looking for a more elegant or quicker solution.

© Stack Overflow or respective owner

Related posts about awk

Related posts about bash