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 c...@case.edu http://cnswww.cns.cwru.edu/~chet/