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 -->
  #3 (permalink)  
Old 09-15-2006
jambesh's Avatar
jambesh jambesh is offline
Registered User
  
 

Join Date: Aug 2006
Location: Pune,India
Posts: 137
Dhruv,
Here is the problem again ..
I have a fixed look up file whose column are in fixed sequence say..
"MANDT SERAIL SERSCHA SEREX EQTYP BSTVP"
i have stored this sequence in a variable ..
Now

I am getting data file whose column sequence could be differnt from that i have mention in the look up string .

I want to resuffle this data file according to the column sequence of the look_up string.

data file column sequence could be

case -1 sequence
----------

SERSCHA SEREX EQTYP BSTVP MANDT SERAIL
333 4343 fdfd fdfdf dssds fdfdf
343 343 rere 43 fdf 4343

case -2 sequence :
-------------------
SEREX EQTYP BSTVP MANDT SERAIL SERSCHA
121 3232 323 ddd sd 223


see the sequence of these file each time sequence of column varies .
the final reaange of these file should be based on the column of the look up[ string always.



Ok
1

Now i want to resuffle this data file so that the column starting with

MANDT should come first then SERAIL ...then SERSCHA SEREX EQTYP

and the final resuffle data should append to a file name say final_data.txt