Idnan/bash-guide

String subtitution Bash version

yarons opened this issue · 2 comments

I think it's worth mentioning that some of the function works on Bash 4+.
I'm pretty certain about ${string^^} etc. not sure about the other functions.

I think that specifying the working version will be super beneficial to mac users (with bash 3) that might get a little disappointed to find some things work differently on their machine.

Depend. La quel porte ce nom

For anyone who still cares: I often test BASH code on all of the full (IE: not beta) releases of BASH (currently 20) to check portability. From this, I was able to confirm that ${NAME^^}, ${NAME,,}, and ${NAME~~} are all >= BASH 4.0 features. Most features of parameter expansion are >= BASH 3.0, however, with some caveats. For example, using ${!NAME} is >= BASH 3.0, but doing this over arrays (IE: an associative array) is >= BASH 4.0.