Hi All!
I got a small problem. let me explaing myself here.
i have a flat file;
ab1234567890cdefghj
AB8373839112CDEFGHI
MN2348897345KJSDFKL
They are fixed length lines. I want to replace characters from 3rd place to 8th with 0's so my out file look like;
ab0000000090cdefghj
AB0000000012CDEFGHI
MN0000000045KJSDFKL
I am trying to use sed 's/?/?/'falt_file >flat_file.new but im not sure how to define the 3rd position to 8th position. like sed 's/^./0/' falt_file > flat_file.new will give us new flat file with its first character replace by 0.
Can any help me please?
Thanks
I got a small problem. let me explaing myself here.
i have a flat file;
ab1234567890cdefghj
AB8373839112CDEFGHI
MN2348897345KJSDFKL
They are fixed length lines. I want to replace characters from 3rd place to 8th with 0's so my out file look like;
ab0000000090cdefghj
AB0000000012CDEFGHI
MN0000000045KJSDFKL
I am trying to use sed 's/?/?/'falt_file >flat_file.new but im not sure how to define the 3rd position to 8th position. like sed 's/^./0/' falt_file > flat_file.new will give us new flat file with its first character replace by 0.
Can any help me please?
Thanks