bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comparison problem with case modification expansion in bash-4.3


From: Chet Ramey
Subject: Re: Comparison problem with case modification expansion in bash-4.3
Date: Tue, 3 Nov 2015 13:48:16 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 11/3/15 9:03 AM, Corentin Peuvrel wrote:
> Hi,
> 
> I think I found a bug in bash-4.3 (4.3.42 in fedora 21), that seems to exists 
> for a long time (at least from 4.1.2 in Centos 6).
> 
> I found a fairly simple way to reproduce it : you have to initialize a 
> variable to an empty string, and do a comparaison to it while doing the case 
> modification expansion ${var,,}
> 
> This doesn't work :
> # foo="" ; [[ bar == *"${foo,,}"* ]] && echo ok

Thanks for the report.  There is a stray quoted null character in the
expanded pattern, which needs to be removed.  This will be fixed in
bash-4.4.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]