forHow to replace values in a string using sed but keep the string intact?
For example echo "01XX1234"
imecho "01XX1234"
I'm looking to replace XX WithXX with a hex value and leave the 0101 and the 1234 in tact, ive1234 intact. I've tried every combination iI can think of but sedsed is getting the better of me.
iI can do it like this but is theirthere an easier way echo "01XX1234" | sed -n 's/(01..1234)/01AB1234/g'?
echo "01XX1234" | sed -n 's/\(01..1234\)/01AB1234/g'