Hi not sure if this is possible but I need some help with a bash script, I have a text file and on the first line that starts with 7150230 I need it to put a 1 at position 79 and a 2 at position 88, this is where it gets complicated, on the next line it finds that starts with 7150230 I then need it to put a 3 at position 79 and a 4 at position 88, next line that starts with 7150230 a 5 at position 79 and a 6 at position 88 and so on.
Below is an example of what I need it to do
71502304541-000 B1 000000000000300100000001800001 2 S
71502304540-000 B2 000000000000300100000000000003 4
71502304541-000 B1 000000000000300100000001800005 6 S
71502304540-000 B2 000000000000300100000000000007 8
71502304541-000 B1 00000000000030010000000180000 S
some data
71502304540-000 B2 00000000000030010000000000000
some more data
here are more
71502304541-000 B1 00000000000030010000000180000 S
71502304540-000 B2 00000000000030010000000000000
Hi that's kind of working problem is when it gets into double digits it's moving everything after up a place, like its inserting an extra character rather than copying over. I have highlighted the problem below, thanks again for all the help.
71402994728-100 Y700/0 0060000000540000ST0000051300000ST 001 S G
71502304541-000 B1 000000000000300100000001800001 2 S
71502304540-000 B2 000000000000300100000000000003 4
7130200619798130823CV10003 5500038441 024 024
71402994729-100 Y701/0 0060000000540000ST0000052920000ST 001 S G
71502304541-000 B1 000000000000300100000001800005 6 S
71502304540-000 B2 000000000000300100000000000007 8
7130200619799130823CV10003 5500038442 024 024
71402994730-100 Y702/0 0060000000600000ST0000052800000ST 001 S G
71502304541-000 B1 000000000000500100000001200009 10 S
71502304540-000 B2 0000000000005001000000000000011 12