I want to replace all single quotes in a string with two single quotes using sed. But when the string contains the & character, the sed command is not repla
&
It's working for me
bash>echo "'This is a string with 'single quote' & '&'" | sed "s/'/''/g" ''This is a string with ''single quote'' & ''&''