Hi Guys. I have tried the commands sort and join. But I couldn't able to to find the command for joining in a single line based on keys.My example inputs and outputs are like the following.
Help would be appreciated.
Input file
a1tabXXXXXXX
a2tabXXXXXXX
a6tabYYYYYYYYY
a71tabXXXXXXX
a62tabYYYYYYYYY
a30tabZZZZZ
a13tabZZZZZ
a43tabZZZZZ
a23tabZZZZZ
outputfile
XXXXXXXtab
a1tab
a2tab
a71
YYYYYYYYYtab
a6tab
a62tab
ZZZZZtab
a30tab
a13tab
a43tab
23