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


Groups > gnu.bash.bug > #11924

Re: Lower case construction does not working properly

From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: Lower case construction does not working properly
Date 2015-11-24 09:22 -0500
Message-ID <mailman.606.1448374979.31583.bug-bash@gnu.org> (permalink)
References <565456B8.2010202@quotix.com>

Show all headers | View raw


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

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Lower case construction does not working properly Greg Wooledge <wooledg@eeg.ccf.org> - 2015-11-24 09:22 -0500

csiph-web