I am looking to use the sed command to replace a substring value.
I have a file like this
UNIT56712423MP000000R0990
The records in this file are always of the same length.
I need to check if the 21st character is R
, then replace characters 13-14 from MP
to GH
.
Is there a way I can achieve this through the sed command?
Thanks for your help.