sed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

to \escape or not to escape - that is the question ( & AMPERSAND )


From: admin4
Subject: to \escape or not to escape - that is the question ( & AMPERSAND )
Date: Mon, 23 Nov 2020 10:35:11 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

hello world,

thanks for your efforts:

this works:

cat test.sed.txt

"this"is"some"string

sed 's/\"/\&quot/g' test.sed.txt > output.txt;

cat output.txt

&quotthis&quotis&quotsome&quotstring

my tool will escape \" and \& in the future

https://dwaves.org/tools/escape/ <https://dwaves.org/tools/escape/>

thanks for the hint

(it is strange... when not escaping & it will not replace but ADD the
string 'quot' behind the " that is supposed to be replaced)

sed 's/\"/&quot/g' test.sed.txt > output.txt;

cat output.txt

"quotthis"quotis"quotsome"quotstring

this mail was written on GNU Linux Debian 10

IF THIS MAIL IS READ ON WINDOWS: WINDOWS DOES NOT COME WITH FREE SUPPORT
X-D (where can we send the bill?)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]