|
Having tested this on the simple files I provided it appears it doesn't work on the more complexed files. The first file has 6 field separated by blanks
File1
LVTS4687 LVTSHPLON ltreb_shu1l110 LVTS4687 LVTSHPLON shu1l110
LVTS1457 LVTSHP sy_unix_live_rooma_onsite_35_35 LVTS1457 LVTSHP syhp10
LVTS5035 LVTSHP sy_unix_live_dmz_duplex_15_35 LVTS5035 LVTSHP srublae03-mgt
LVTS1786 LVTSHPLON lmurb_shu1l282 LVTS1786 LVTSHPLON shu1l282-sy
LVTS5431 LVTSHPLON lmurb_shu1l282 LVTS5431 LVTSHPLON shu1l282-sy
LVTS5750 LVTSHP nw_unix_live_dmz_duplex_35_35 LVTS5750 LVTSHP NRUCCAE09-MGT
LVTS5430 LVTSHP nw_unix_live_dmz_duplex_15_35 LVTS5430 LVTSHP nwhp3
LVTS4021 LVTSHP nw_unix_live_phase4_duplex_35_90 LVTS4021 LVTSHP nhu1u282
The second file has 5 fields
File 2
0508 0601 LVTS4687 58 1
0509 0108 LVTS4687 58 1
0509 0108 LVTS4687 58 1
0509 0108 LVTS4687 58 1
0508 2206 LVTS5035 98 1
0508 2206 LVTS5035 98 1
0508 2206 LVTS5035 98 1
0508 2206 LVTS5430 98 1
0508 2206 LVTS5430 98 1
0508 2206 LVTS5430 98 1
0508 2206 LVTS5431 98 1
0508 2206 LVTS5431 98 1
0508 2206 LVTS5431 98 1
0506 0920 LVTS5750 141 3
0506 0920 LVTS5750 141 3
0506 0920 LVTS5750 141 3
0506 0920 LVTS5750 141 3
0506 0920 LVTS5750 141 3
0506 0920 LVTS5750 141 3
and the result would need to look like
File3
0508 0601 LVTS4687 58 1 ltreb_shu1l110 shu1l110
0509 0108 LVTS4687 58 1 ltreb_shu1l110 shu1l110
0509 0108 LVTS4687 58 1 ltreb_shu1l110 shu1l110
0509 0108 LVTS4687 58 1 ltreb_shu1l110 shu1l110
0508 2206 LVTS5035 98 1 sy_unix_live_dmz_duplex_15_35 srublae03-mgt
0508 2206 LVTS5035 98 1 sy_unix_live_dmz_duplex_15_35 srublae03-mgt
0508 2206 LVTS5035 98 1 sy_unix_live_dmz_duplex_15_35 srublae03-mgt
0508 2206 LVTS5430 98 1 nw_unix_live_dmz_duplex_15_35 nwhp3
0508 2206 LVTS5430 98 1 nw_unix_live_dmz_duplex_15_35 nwhp3
0508 2206 LVTS5430 98 1 nw_unix_live_dmz_duplex_15_35 nwhp3
0508 2206 LVTS5431 98 1 lmurb_shu1l282 shu1l282-sy
0508 2206 LVTS5431 98 1 lmurb_shu1l282 shu1l282-sy
0508 2206 LVTS5431 98 1 lmurb_shu1l282 shu1l282-sy
0506 0920 LVTS5750 141 3 nw_unix_live_dmz_duplex_35_35 NRUCCAE09-MGT
0506 0920 LVTS5750 141 3 nw_unix_live_dmz_duplex_35_35 NRUCCAE09-MGT
0506 0920 LVTS5750 141 3 nw_unix_live_dmz_duplex_35_35 NRUCCAE09-MGT
0506 0920 LVTS5750 141 3 nw_unix_live_dmz_duplex_35_35 NRUCCAE09-MGT
0506 0920 LVTS5750 141 3 nw_unix_live_dmz_duplex_35_35 NRUCCAE09-MGT
0506 0920 LVTS5750 141 3 nw_unix_live_dmz_duplex_35_35 NRUCCAE09-MGT
this file comprises of field 1 2 3 4 5 of file2 and field 3 and 6 of file1
|