sed -i 's/& /& /g' *
I need to replace all the "& " with "& ", but sed is adding an additional space "& amp; ". Why is that and how can I replace the ampersand with sed?
"& amp; "
Have you escaped the &, as it is a Bash operator?
sed 's/\& /\& /g'
Seems to give the correct result.
This works but the & is inside quotes. Why does it need escaping if it's already quoted?