I was looking for some help replacing particular characters if based on the first 10 characters of a line. For example:
If the line is
test ( 2 ) [123456789]
I would like to replace it with
test ( 2 ) [123MMM789]
i.e, if the line starts with test ( 2 ) replace columns 19,20,21 with M
if the line starts with anything else, it can be left as is. Thank you in advance!
You can use a match and
substr:This can also be applied to the command line directly, since it is pretty simple: