bb sed 'N' broken
Denys Vlasenko
vda.linux at googlemail.com
Sun Jul 21 20:10:34 UTC 2013
On Sunday 21 July 2013 10:19, Timo Teras wrote:
> On Fri, 19 Jul 2013 09:02:23 +0300
> Timo Teras <timo.teras at iki.fi> wrote:
>
> > I "accidentally" noticed that some sed scripts perl configure does
> > take a long time with bb sed, but works fast with gnu sed. So I
> > tracked the issue down.
> >
> > Basically:
> > sed -n -e ': testcont; /\\$/{ =; N; b testcont }'
> >
> > With the input:
> > --cut--
> > this is a regular line
> >
> > and line with \
> > continuations
> >
> > more regular lines
> >
> > --cut--
> >
> > I expect to only get one output, '3' which the line number of the line
> > having the trailing '\' that should match. And this is what I indeed
> > get with GNU sed.
>
> The following fixes it. Seems GNU sed has GNU extension flags to set
> REG_NEWLINE if wanted, but it defaults off.
Applied, thanks.
More information about the busybox
mailing list