Reading sed manual, It seems only \ and & are to be watch out for in replacement space when using the s command in sed.
Are there any other characters having special meaning in replacement space? (Affecting the replacement)
Reading sed manual, It seems only \ and & are to be watch out for in replacement space when using the s command in sed.
Are there any other characters having special meaning in replacement space? (Affecting the replacement)
Short Answer: You need to quote '\' '&' and new line.
Long Answer: The 'sed' man page indicates
To include a literal '\', '&', or newline in the final replacement,
be sure to precede the desired '\', '&', or newline in the REPLACEMENT
with a '\'.
Implying all other characters are valid literals in the REPLACEMENT string.