[BusyBox] More wandering through busybox sed source...

Glenn McGrath bug1 at optushome.com.au
Sun Sep 14 12:54:23 MDT 2003


On Sat, 13 Sep 2003 19:35:51 -0400
Rob Landley <rob at landley.net> wrote:

> parse_subst_cmd is a touch wonky.  Specifically the bit about trailing
> 
> whitespace after s/// is ok (around like 300 or so).
> 
> This leads to:
> 
> [landley at localhost busybox-1.00-pre3]$ sed 's/c/q/ s/d/l/' <
> ../strings sed: -e expression #1, char 8: Unknown option to `s'
> [landley at localhost busybox-1.00-pre3]$ ./busybox sed 's/c/q/ s/d/l/' <
> 
> ../strings
> a
> b
> q
> l
> e
> f
> g
> [landley at localhost busybox-1.00-pre3]$
> 
> Probably doesn't hurt anything, just letting people know...

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 ?


Posix says

The script shall consist of editing commands of the following form:

[address[,address]]function

The command can be preceded by <blank>s and/or semicolons. The function
can be preceded by <blank>s. These optional characters shall have no
effect.



Glenn


More information about the busybox mailing list