[BusyBox] More wandering through busybox sed source...
Glenn McGrath
bug1 at optushome.com.au
Sun Sep 14 02:57:17 UTC 2003
On Sat, 13 Sep 2003 22:13:52 -0400
Rob Landley <rob at landley.net> wrote:
> On Saturday 13 September 2003 21:54, Glenn McGrath wrote:
>
> > I think acording to posix 's/a/b/;s/b/c/' and 's/a/b/ s/b/c/' are
> > supposed to be the same
> >
> > But now im confused acording to posix is 's/a/b/ g' one command or
> > two ?
>
> In this case, the g is an option to the s command, not the start of a
> new command. gnu sed is parsing it as such, and complaining that it
> doesn't know what a space means as an option to the s command. It's
> not clear where the previous command terminated (unless you're allowed
> to just terminate it with the first thing you don't recognize). I
> thought that was what the semicolons were for.
Acording to posix, the substituion must be in the following form when the flags isnt w.
[blank_or_;][address[,address]][blank]function[2addr]s/BRE/replacement/
flags[blank_or_;]
GNU and busybox sed parses
[blank_or_;][address[,address]][blank]function[2addr]s/BRE/replacement/
[blanks]flags[blank_or_;]
I agree that its wrong, i just sent a bug report to GNU sed.
> On a side note, I notice that numeric and w flags to the s command
> aren't implemented yet. Would it help if I compiled a list of stuff
> like this, or do you have one?
A list would of unimplimented commands would be usefull.
Thanks
Glenn
More information about the busybox
mailing list