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-20-2008
finalight finalight is offline
Registered User
  
 

Join Date: May 2008
Posts: 51
need help extracting this part


Code:
           JADE TRADER       143W       MYPEN  40   HC   M    X10    28    7	1      0
                                        MYPEN  20   GP   X    X10    15    2	1      0
                                        MYPEN  40   GP   X    X10    28    7	1      0
                                        MYPEN  20   GP   L    X10    15    2	1      0
       BUNGA TERATAI 3       5055       NZLYT  20   GP   X    X11    17    8	1      0
          MOL SPLENDOR      0307A       MUPLU  40   HC   X    X11    10    2	2      0
                                        MUPLU  40   HC   U    X11    10    2	1      0

i doing a script to extract the result and want the result to be like this

JADE TRADER 143W MYPEN 40 HC M X10 28 7 1 0
JADE TRADER 143W MYPEN 20 GP X X10 15 2 1 0
JADE TRADER 143W MYPEN 40 GP X X10 28 7 1 0
JADE TRADER 143W MYPEN 20 GP L X10 15 2 1 0
BUNGA TERATAI 3 5055 NZLYT 20 GP X X11 17 8 1 0
MOL SPLENDOR 0307A MUPLU 40 HC X X11 10 2 2 0
MOL SPLENDOR 0307A MUPLU 40 HC U X11 10 2 1 0

so how can I achieve this result, given that I do not know how many subsets are there for each of the first field..?