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

Path csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail
From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: Lower case construction does not working properly
Date Tue, 24 Nov 2015 09:22:20 -0500
Lines 19
Approved bug-bash@gnu.org
Message-ID <mailman.606.1448374979.31583.bug-bash@gnu.org> (permalink)
References <565456B8.2010202@quotix.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1448374979 7989 208.118.235.17 (24 Nov 2015 14:22:59 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To Michael Kazakov <mkazakov@quotix.com>
Envelope-to bug-bash@gnu.org
Content-Disposition inline
In-Reply-To <565456B8.2010202@quotix.com>
User-Agent Mutt/1.4.2.3i
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From 139.137.100.1
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:11924

Show key headers only | 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