The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-27-2009
repinementer repinementer is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 158
merging similar columns in a single line file

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

XXXXXXXtaba1taba2taba71
YYYYYYYYYtaba6taba62tab
ZZZZZtaba30taba13taba43tab23
Bits Awarded / Charged to repinementer for this Post
Date User Comment Amount
05-28-2009 nshailesh N/A 24