Im trying to learn awk at the moment and I want to do a specific task. My question is similar in scope to one previously posted(Using awk to transpose column to row), but wouldn't quite work for my data. I have been trying to work out why and im sure its quite simple.
I have large data in a tab delimited table with only two fields (example below):
1101\t7778
1101\t7755
1101\t8889
1101\t6789
2300\t1220
4000\t2333
4000\t7555
4000\t9000
4000\t1111
and I want to end up appending the second field onto a row when the field matches. The desired output would be:
1101\t7778\t7755\t8889\t6789
2300\t1220
4000\t2333\t7555\t9000\t1111
If possible, Id like to get an explaination of all the parts within the command so I can understand it in the future. Thanks in advance.