Update
Thanks @steeldriver for the answerd, the problem doesn't the double quote is the /
only i needeed remplace for |
Currently I have some problems with the sed
command, I try to replace a string inside a file, the problem is the replace contains a double quote.
The variable contain the value of a file: the variable text have this value
<string name="app_mod_app_crowdin_1">crowdin one es</string>
The problem is when execute the command sed
sed -i .bak -e "Ns/.*/$text/" results.txt
error
sed: 1: "1s/.*/<string name="app ...": bad flag in substitute command: 's'
$text
that's the problem - rather than the double quotes – steeldriver Mar 23 '21 at 00:13$text
string happens to contain a|
? ... or&
, or\1
... – Kusalananda Mar 23 '21 at 17:15