BASH 5 Conundrum : ${S^b}

From: Chris Elvidge ([email protected])

echo $BASH_VERSION
5.0.2(1)-release

Where
S="bracketsbrackets"
echo "${S^b}" gives Bracketsbrackets
echo "${S^^b}" gives BracketsBrackets
as expected

But
S="{brackets}(brackets)"
echo "${S^b}" gives {brackets}(brackets) (not working as expected)
echo "${S^^b}" gives {Brackets}(Brackets) (as expected)

(Characters other than 'b' seem to be the same.)

Has anyone any ideas why?

Cheers

--

Chris Elvidge, England

Share |