sed command separator

Denys Vlasenko vda.linux at googlemail.com
Mon Jul 8 00:40:45 UTC 2013


On Sunday 07 July 2013 22:30, Cristian Ionescu-Idbohrn wrote:
> On Sat, 6 Jul 2013, Rob Landley wrote:
> > On 07/03/2013 06:55:55 AM, Cristian Ionescu-Idbohrn wrote:
> > > Just noticed this behaviour:
> > >
> > > With 'sed (GNU sed) 4.2.2':
> > >
> > > $ printf 'foo\nbar baz\n' | sed -e '/baz/!ds/[[:blank:]]*bar[[:blank:]]*//'
> > > sed: -e expression #1, char 8: extra characters after command
> > >
> > > With 'BusyBox v1.20.2', various archs:
> > >
> > > $ printf 'foo\nbar baz\n' | busybox sed -e
> > > '/baz/!ds/[[:blank:]]*bar[[:blank:]]*//'
> > > baz
> > >
> > > Shouldn't the regex syntax be '/baz/!d;s/...'?
> > >                                       ^
> >
> > So you're complaining it _worked_?
> 
> Yes, as strange as it may sound :)

I added a comment explaining where it happens.


More information about the busybox mailing list