I am trying a sed replacement from a text file and whats in the text file has a & character in different parts of whats in the text file so it just appends it. I want to replace and not append. I am doing this with multiple vars and the & is in different spots on each var and sometimes back to back & characters inthe middle of the string.
echo $myvar > temp.txt
sed -i "s/orignaltxt/$(cat temp.txt)/" file.yaml