Hi All,
I have a file and it is a fixed length file. I want to move the values from 42,6 ( where 6 is length) to the 36th position
Original file:
00000100000100000100000100000100001 000870
00001000001000001000001000001000001 000879
09000001000001000001000001000001001 001818
29000020900000100000100000100000001 001816
29000020900000100000100000100000001 001817
Expected :
00000100000100000100000100000100001000870
00001000001000001000001000001000001000879
09000001000001000001000001000001001001818
29000020900000100000100000100000001001816
29000020900000100000100000100000001001817
Things I have tried.
I am doing a cut
on 42,6 and storing it in temp file then doing cut
on 1,36 and the merging the file. Not working
cut -c1-36 file1
cut c46-52 file2
join file1 file2 > file3 -- not giving right result
Paste -s file1 file2 -- giving me all result in one line formate
cat file1 file2 --->appending the file at end
Thanks in advance