bug-sed
[Top][All Lists]
Advanced

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

bug#30794: Cannot produce backslash through hexadecimal - sed (GNU sed)


From: Assaf Gordon
Subject: bug#30794: Cannot produce backslash through hexadecimal - sed (GNU sed) 4.2.2
Date: Tue, 13 Mar 2018 20:45:32 -0600
User-agent: Mutt/1.5.24 (2015-08-30)

Hello,

On Tue, Mar 13, 2018 at 06:02:05PM +0800, 0xddaa wrote:
> There is the Proof-of-Concept:
> 
> # echo z | sed 's/z/\x5c/' # \x5c == '\'
> \ # success
> # echo z | sed 's/z/\x5c\x61/'
> a # backslash is gone
> 
> According the manual, *\xxx* should produce an ascii character. sed should
> not treat *\x5c* as an escape symbol.

Thank you for reporting this issue with such clear details
and providing a bug fix - much appreciated!

I expanded your fix by adding tests and news item, see attached patch.

There is a small issue that this is a backwards incompatible change,
and might break some exotic (bad) scripts.

I'll wait for other opinions before pushing this.

Jim,
What do you think?

regards,
 - assaf

Attachment: 0001-sed-treat-x5c-as-literal-backslash.patch
Description: Text Data


reply via email to

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