GNU bug report logs - #23493
gnu sed word replace bug

Previous Next

Package: sed;

Reported by: xingzx <richshaw <at> 126.com>

Date: Mon, 9 May 2016 17:19:03 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Davide Brini <dave_br <at> gmx.com>
Cc: 23493 <at> debbugs.gnu.org
Subject: bug#23493: gnu sed word replace bug
Date: Mon, 9 May 2016 14:59:07 -0700
tags 23493 notabug
close 23493
done

On Mon, May 9, 2016 at 2:17 PM, Davide Brini <dave_br <at> gmx.com> wrote:
> On Tue, 10 May 2016 01:02:35 +0800, xingzx <richshaw <at> 126.com> wrote:
...
> No bug, in GNU sed, \< and \> are special and get interpreted, while on
> OSX sed the \ in the \< combination is silently stripped.
> So if you just want to match a literal lesser sign, just use it unescaped
> (and in any case, you surely don't have to escape it in the replacement
> part):
>
> $ echo '<WebCore/DOMElement.h>'| sed -E 's/<WebCore\//<WebKitLegacy\//'
> <WebKitLegacy/DOMElement.h>

Thanks again for responding, Davide.
With the directives above, I've marked this as a non-bug and closed
the auto-created issue.




This bug report was last modified 8 years and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.