Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11825
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Comparison problem with case modification expansion in bash-4.3 |
| Date | 2015-11-03 13:48 -0500 |
| Message-ID | <mailman.1600.1446576518.7904.bug-bash@gnu.org> (permalink) |
| References | <55DC9992.8070209@pom-monitoring.com> <5638BECC.4010906@pom-monitoring.com> |
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/
Back to gnu.bash.bug | Previous | Next | Find similar
Re: Comparison problem with case modification expansion in bash-4.3 Chet Ramey <chet.ramey@case.edu> - 2015-11-03 13:48 -0500
csiph-web