Masters,
I have fixed length input file like
FHEAD0000000001XXXX20090901 0000009000Y1000XXX2
THEAD000000000220090901 ITM0000109393813 430143504352N22SP 000000000000RN000000010000EA P0000000000000014390020090901
TTAIL0000000003000000
FTAIL00000000040000000002
Note the fields in Bold Italicized.. These fields need to be replaced with variable in shell script( of same format YYYYMMDD ). I used cut command, but it is trimming the spaces between the fields.
How to I achieve this field replacement, without changing the length/ format of the file
---------- Post updated at 03:08 PM ---------- Previous update was at 03:07 PM ----------
Forogt to mention that I have to change only in FHEAD and THEAD records only in those positions.