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:
> michael@kazakov:~> VAR=COLORADO
> michael@kazakov:~> echo ${VAR,c}
> COLORADO
> michael@kazakov:~> 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