On Fri, Jan 13, 2012 at 9:48 PM, [email protected] <[email protected]> wrote:
> Hi!
>
>> Right.  Still, question remains: what's wrong with:
>>
>> >> > $ busybox sed -n 
>> >> > 's,^\#define[[:space:]]\{1\,\}BOOT_TRAMPOLINE[[:space:]]\{1\,\},,p'
>> >> > sed: bad regex 
>> >> > '^\#define[[:space:]]\{1\,\}BOOT_TRAMPOLINE[[:space:]]\{1\,\}':
>> >> > Invalid content of \{\}
>>
>> Should work with busybox too.  Even if ',' is used as separator, it's IMO
>> corectly escaped in range '\{1\,\}'.  Thoughts?

Good point.

> Which shell do you use?

busybox ash

> Does this fail if you use bash or only if the
> Busybox sh is involved.

happens with both.

$ bash -c "busybox sed -n
's,^\#define[[:space:]]\{1\,\}BOOT_TRAMPOLINE[[:space:]]\{1\,\},,p'"
sed: bad regex '^\#define[[:space:]]\{1\,\}BOOT_TRAMPOLINE[[:space:]]\{1\,\}':
Invalid content of \{\}

> That quoting trouble looks like a problem in
> Busybox sh when using single quotes. This fails on other programs to as
> the backslash quoting character is/is not removed by the shell
> argument passing as expected. So try this first before digging to deep
> into sed.

-- 
Natanael Copa
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to