I have a flat file in UNIX format delimited by ; (Semicolon) with the following structure:
2020-01-30;1010;1
2020-01-30;1150;2
2020-02-03;1190;3
I must replace each character from position (12,4)
0->1
1->2
2->3
3->4 etc etc...
Staying:
2020-01-30;2121;1
2020-01-30;2261;2
2020-02-03;2201;3
I have tried several strategies with no success:
sed -i 's/0/9/g; s/1/8/g; s/2/7/g; s/3/6/g; s/4/5/g; s/5/4/g; s/6/3/g; s/7/2/g; s/8/1/g; s/9/0/g' data.dat > data1.dat
Do you have any strategy?