Hi i am trying to append value with 0 to an existing file in the position 50-56 & 58-64 only where empty space is there
Rule:
1 row already has some value and i do not want to change anything for this row.
2nd record below you see the position 50-64 is empty, i want to replace with 0000000 from position 50-56 & 58-64.
3rd record same like 2nd record.
4th record same like 2nd record
5th record empty space is there only position 58-64.
6th record same like 2nd record.
7th record.......
8th record.........
..........
........etc.
like wise i may have many records in FILE1.
I want to write a program in .KSH where it append the FILE1 with zeroes on the position mention above and want the outfile FILE2. All the records will begin with no 2.
Any help is appreciated.
FILE1:
26666666660000001 B86860003OLFXXX592123320081227 0000002 0000003-
27777777770000653-B94030001OLFXXX000000120081227
28888888880000654-E71060001OLFXXX000000220081227
29999999990000655 E71060002OLFXXX000000320081227
21112223330000101 E71060002OLFXXX000000320081227 0000102
22222222220000201 E71060002OLFXXX000000320081227
FILE2:
26666666660000001 B86860003OLFXXX592123320081227 0000002 0000003-
27777777770000653-B94030001OLFXXX000000120081227 0000000 0000000
28888888880000654-E71060001OLFXXX000000220081227 0000000 0000000
29999999990000655 E71060002OLFXXX000000320081227 0000000 0000000
21112223330000101 E71060002OLFXXX000000320081227 0000102 0000000
22222222220000201 E71060002OLFXXX000000320081227 0000000 0000000
thanks