[BusyBox] backref problem with sed?

Jim Gleason (Admin) jimg at lineo.com
Mon Aug 20 14:19:53 UTC 2001


The problem is actually with line 549 of sed.c and its call to "regexec()".
The 3rd parameter "sed_cmd->num_backrefs+1" forces at least one character to
be matched (according to how I read the regexec man pages).  This character
is then output in the "print_subst_w_backrefs()" function called in the
loop.  I'm not sure what the correct solution is however, so I turn it over
to the group for now.

Jim Gleason

"Bene, Martin" wrote:

> Hi, I get the following effect:
>
> # echo "BOOT_IMAGE=vmlinuz root=/dev/hda5 initrd=init1" | ./sed -e
> 's/.*root=/\1/'
> u/dev/hda5 initrd=init1
>
> The leading "u" character comes from the "vmlinuz" string, but what is it
> doing in the output? Either I'm doing something stupid or there's a bug;
> standard sed works as expected.
>
> Bye, Martin
>
> _______________________________________________
> busybox mailing list
> busybox at opensource.lineo.com
> http://opensource.lineo.com/mailman/listinfo/busybox


More information about the busybox mailing list