[BusyBox] another minor sed problem

Jeff Studer jstuder at aquilagroup.com
Fri Apr 19 10:07:04 UTC 2002


GNU sed version 3.02 does the same thing for both commands:

$ echo xyz | sed 's/y/[/'
x[z
$ echo xyz | sed 's/y/\[/'
x[z

Tom Oehser wrote:

> Yes, I discovered that, but there are 2 problesm with it:
>
> 1) Sed scripts made for the real sed will break.
>
> 2) It is then impossible to have an environment variable
>    that is also used outside of sed.  For example, if I do:
>
>  export BL=
>
> and then want to be able to do *both*:
>
>  echo $BL
>
> AND
>
>  sed -e "s/{/$BL/"
>
> it fails.
>
> -Tom
>
> On Fri, 19 Apr 2002, Ilguiz Latypov wrote:
>
> > Date: Fri, 19 Apr 2002 11:15:36 -0400 (EDT)
> > From: Ilguiz Latypov <ilatypov at superbt.com>
> > To: Tom Oehser <tom at toms.net>
> > Cc: busybox at busybox.net
> > Subject: Re: [BusyBox] another minor sed problem
> >
> >
> > Tom,
> >
> > This one seems to work.
> >
> >     # echo xyz | sed 's/y/\[/'
> >     x[z
> >
> > Ilguiz
> >
> > On Fri, 19 Apr 2002, Tom Oehser wrote:
> >
> > >  echo xyz | sed -e "s/y/[/"
> > ...
> > > sed: bad format in substitution expression
> >
> > _______________________________________________
> > busybox mailing list
> > busybox at busybox.net
> > http://codepoet.org/mailman/listinfo/busybox
> >
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://codepoet.org/mailman/listinfo/busybox

--
Jeff Studer
Software Engineer
Aquila Technologies Group

jstuder at aquilagroup.com
office:  505-796-3859




More information about the busybox mailing list