sed 's:^Comment=\(.*$\):Comment='\''<span size="xx-large">\1</b>'\': \
-i when you are sure you have what you want.
s:x:y: - This is the overall replacement pattern, basically replace
y. Obviously we have a lot more between the colons above! Usually
sed takes whatever comes after the
s and using
/ here would mean you need to escape it in the pattern.
^Comment= - regex match
Comment= at the start of a line (
^ ). Good practice since it is possible (though unlikely) to get this elsewhere, which would cause problems.
\(.*$\) - match anything (
.* ) up to the end of the line (
$ ). Surrounding with
\( \) creates a back reference for use later.
'\'' - close the
'' quotes, put a literal
' and reopen quotes. Alternative method to @terdon's.
Comment=<span size="xx-large">\1</b> - replacement string,
\1 is the backreference from before.
'\': - close quotes, put a literal
' then the final colon.