awk/sed/bash to merge 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/04/30 23:07 UTC
Read the original article Hit count: 281

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