On Thu, Nov 24, 2016 at 12:38 AM, Denys Vlasenko
<[email protected]> wrote:
> On Tue, Nov 22, 2016 at 6:17 PM, walter harms <[email protected]> wrote:
>> busybox 1.25.0
>> $ TEST="[ \t\r]"
>> $ echo ${TEST%]}
>> [ \t\r
>> $ echo ${TEST#[}
>> [ \t\r]
>>
>> GNU bash, version 3.2.39
>> $ TEST="[ \t\r]"
>> echo ${TEST%]}
>> [ \t\r
>> echo "${TEST#[}"
>>  \t\r]
>>
>> It seems that ${#} does not eat [:
>> TEST="[[[[" ; echo "${TEST#[}"
>> [[[[
>> TEST="[[[[" ; echo "${TEST#[}"
>> [[[
>
> Reproduced. Looks like a bug in uclibc:
>
> pmatch("[","[") returns 0 "no match",
>
> but in glibc, it returns 1.

Just for the record. "pmatch" I talked about is
a define in ash.c, on libc level, it's fnmatch:

#define pmatch(a, b) !fnmatch((a), (b), 0)
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to