sed bug ?
Timo Teras
timo.teras at iki.fi
Thu Nov 17 12:22:46 UTC 2016
On Thu, 17 Nov 2016 12:08:27 +0000
<dietmar.schindler at manroland-web.com> wrote:
> > Von: Timo Teras
> > Gesendet: Donnerstag, 17. November 2016 10:56
> >
> > The following discrepancy happens on 1.25.1 (and git master) with
> > musl c-library:
> >
> > ~ $ echo /usr/lib/ | sed 's,\(^/\|\)[^/][^/]*,..,g'
> > ../../
> >
> > ~ $ echo /usr/lib/ | busybox sed 's,\(^/\|\)[^/][^/]*,..,g'
> > /../../
> >
> > Any thoughts?
>
> The output of busybox sed is indeed incorrect.
Someone replied offlist that the regexp is using \| which apparently is
GNU extension. Apparently it would be better to convert the above to
use ERE, or fix it in some other manner.
Thanks,
Timo
More information about the busybox
mailing list