[BusyBox] [PATCH] keep initial leading whitespace in sed 'a' cmd (1.0.0-pre8)

Rob Landley rob at landley.net
Fri Apr 2 01:53:30 UTC 2004


On Thursday 01 April 2004 13:18, Junio Hamano wrote:
> >>>>> "EA" == Erik Andersen <andersen at codepoet.org> writes:
> >>
> >> For that matter, you broke:
> >>
> >> sed -i -e "/^config setup/a \\" -e "   fred" ipsec.conf
> >>
> >> I.E. there can legally be spaces between the a and the backslash at the
> >> end of the line.
>
> EA> Sorry about that.  Thanks for checking and fixing it.
>
> Same here, sorry about that.  I was only looking at GNU sed info

Oh I'm not mad or anything.  Thanks for finding the bug.  Thanks also for 
tracking down the bit that needed tweaking; right after seeing the first 
message my first guess was to go through add_cmd.  Your second message saved 
me a bit of debugging time.

I'm just trying to train Eric to cc: me on sed patches before applying them to 
reduce the cvs commit noise. :)

> pages and SUSv3 manual pages, both of which only talked about
> the 'a' command immediately followed by a backslash and a
> newline, followed by a block of text each of whose internal
> newline is quoted with a backslash.  I did not realize GNU sed
> allowed the usage you showed above.

Real world sed usage is extremely funky.  I'm trying to debug all the uses in 
build scripts, but I'm sure there's more in strange shell scripts and cgi and 
who knows what out there...

Rob




More information about the busybox mailing list