Hello I am looking to do the following:
file= sample.out
replace whatever text is in position 10-15 with "77777" but only on rows that start with ABC
so far I have:
cat sample.out | sed -r 's/^ABC(.{9})/\177777/'
But ABC at the beginning of the lines gets removed and 77777 gets inserted into the text position instead of replacing the existing the characters in that position.