sed command separator

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Sun Jul 7 20:30:25 UTC 2013


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 :)


Cheers,

-- 
Cristian


More information about the busybox mailing list