1

Concate lines by first column (AWK or SED)

view story
linux-howto

http://unix.stackexchange.com – Please advice how to use AWK in this situation? How to concate lines that start with same column. Only first column kept (in this case aaa,www,hhh) Space or tab separated file Example input: aaa bbb ccc ddd NULL NULL NULL aaa NULL NULL NULL NULL NULL NULL aaa bbb ccc NULL NULL NULL NULL www yyy hhh NULL NULL NULL NULL hhh 111 333 yyy ooo hyy uuuioooy hhh 111 333 yyy ooo hyy NULL Desired output: aaa bbb ccc ddd NULL NULL NULL NULL NULL NULL NULL NULL NULL bbb ccc NULL NULL NULL NULL www yyy hhh NULL NULL NULL NULL hhh 111 333 yyy ooo hyy uuuioooy 111 333 yyy ooo hyy NULL Reason for thi (HowTos)