Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11825

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

Path csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail
From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: Comparison problem with case modification expansion in bash-4.3
Date Tue, 3 Nov 2015 13:48:16 -0500
Lines 21
Approved bug-bash@gnu.org
Message-ID <mailman.1600.1446576518.7904.bug-bash@gnu.org> (permalink)
References <55DC9992.8070209@pom-monitoring.com> <5638BECC.4010906@pom-monitoring.com>
Reply-To chet.ramey@case.edu
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1446576519 6450 208.118.235.17 (3 Nov 2015 18:48:39 GMT)
X-Complaints-To action@cs.stanford.edu
Cc Julien Thomas <jthomas@pom-monitoring.com>, chet.ramey@case.edu
To Corentin Peuvrel <cpeuvrel@pom-monitoring.com>, bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
In-Reply-To <5638BECC.4010906@pom-monitoring.com>
X-Mirapoint-Virus-RAPID-Raw score=unknown(0), refid=str=0001.0A020201.56390170.025E,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46
X-Mirapoint-Loop-Id 2de47cf0941188dca3467d5a0c0ca79e
X-Junkmail-Whitelist YES (by domain whitelist at mpv3-2015.case.edu)
X-Mirapoint-Virus-RAPID-Raw score=unknown(0), refid=str=0001.0A020202.56390171.00C4,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46
X-Mirapoint-Loop-Id 88f96394f0d3c92b17ca79a06fca5ba5
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From 129.22.103.194
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11825

Show key headers only | View raw


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


Thread

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