I have
#!/usr/bin/bash
search="ldo_vrf18 {"
replace="$search"' compatible = "regulator-fixed";
regulator-name = "vrf18";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-enable-ramp-delay = <120>;'
sed -i "s/$search/$replace/g" output.file
The result is
sed: -e expression #1, char 62: unterminated `s' command
I suspect some values arent being escape in replace
. Is there a way to escape them?
I have tried sed -i 's/'"$search"'/'"$replace"'/g' output.file
with the same result