[Bug 5084] Small differences between Gnu and BusyBox sed

bugzilla at busybox.net bugzilla at busybox.net
Sun Apr 24 14:51:36 UTC 2016


https://bugs.busybox.net/show_bug.cgi?id=5084

Denys Vlasenko <vda.linux at googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|NEW                         |RESOLVED

--- Comment #1 from Denys Vlasenko <vda.linux at googlemail.com> ---
(In reply to dubiousjim from comment #0)
> $ printf 'abc\n' | sed -n 's/x*/=&=/gp'
> Gnu sed will replace against four zero-length matches. BusyBox sed will only replace against the first.

Works for me in recent versions of bbox

(3)/(4) appear to be dependent on regex implementation in libc. For example:

system sed:

$ printf 'abc\n' | sed -n 's/x**/=&=/gp'
sed: -e expression #1, char 12: Invalid preceding regular expression

bbox sed, uclibc:

$ printf 'abc\n' | ./busybox sed -n 's/x**/=&=/gp'
==a==b==c==

bbox sed, glibc:

$ printf 'abc\n' | ./busybox sed -n 's/x**/=&=/gp'
sed: bad regex 'x**': Invalid preceding regular expression

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list