@Didier Spaier Yes, that expansion can do the same with little extra work
But ${var~} expanded with non blank separators too
bash 4.2.45(2)-release
$ a='the_rolling_stones'
$ echo ${a~}
The_Rolling_Stones
$ a='the.rolling.stones'
$ echo ${a~}
The.Rolling.Stones
$ a='the-rolling-stones'
$ echo ${a~}
The-Rolling-Stones
bash 4.3.11(1)-release
a='the_rolling_stones'
[[ "$a" =~ [^[:alnum:]] ]]
for var in $(tr $BASH_REMATCH ' ' <<<"$a");do
echo -n "${var^}$BASH_REMATCH"
done|sed 's/.$//';echo
The_Rolling_Stones
Will be more complicated with different separators I guess
I think Bash is taking the job with little editions, like
those with capitalization, or substitution and trimming,
things done with sed, cut, tr, etc...
Let's see on future releases what they got on 'testing' dir
One can use those expansions at home, but if the script
will be public, chances of incompatibility are very big.
@fskmh thanks for the testings, I didn't remember to test all those options.
Is that regression intentional? It will break someone's scripts around the world,
this is for sure.