bug-bash
[Top][All Lists]
Advanced

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

Re: Lower case construction does not working properly


From: Greg Wooledge
Subject: Re: Lower case construction does not working properly
Date: Tue, 24 Nov 2015 09:22:20 -0500
User-agent: Mutt/1.4.2.3i

On Tue, Nov 24, 2015 at 02:23:20PM +0200, Michael Kazakov wrote:
> I have founded a bug in variable manipulation behavior of bash version 
> 4.2.53.
> Constructions ${parameter,pattern} and ${parameter,,pattern} does not 
> working properly:
> address@hidden:~> VAR=COLORADO
> address@hidden:~> echo ${VAR,c}
> COLORADO
> address@hidden:~> echo ${VAR,,o}
> COLORADO

You have to specify the letters you want to match (change), not what
they would become after the change.

imadev:~$ var=FOO; echo "${var,F}" "${var,,O}"
fOO Foo
imadev:~$ var="ABCDEFGHIJKLMNOP"; echo "${var,,[AEIOU]}"
aBCDeFGHiJKLMNoP



reply via email to

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