" command is for inserting whole lines above the one you matched (and "a
" appends them after it). You need to use the "s
" command to edit the line itself.
In this case you need to match the character or string you want on the left side of the substitution, and save it in a regex backreference. Then you can insert it into the right-hand-side replacement text. This means you'll probably want to use the -r
program option. Don't forget the "g
" substitution modifier too if there can be multiple matches on the line (s///g
Here are a few useful sed references.
PS: Please use [code][/code]
tags around your code and data, to preserve formatting and to improve readability. Please do not use quote tags, colors, or other fancy formatting.