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: Pierre Gaston
Subject: Re: Lower case construction does not working properly
Date: Tue, 24 Nov 2015 16:23:14 +0200



On Tue, Nov 24, 2015 at 2:23 PM, Michael Kazakov <mkazakov@quotix.com> wrote:
Hellol.
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
 
c is a pattern that only matches a lower case c, so it will not match an upper case C

$ VAR=COLORADO; echo ${VAR,C}
cOLORADO


As an aside shopt -s nocasematch and shopt -s nocaseglob don't seem to apply, with both on:

$ VAR=COLORADO; echo ${VAR,[c]}
COLORADO




reply via email to

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