Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String subtitution Bash version #13

Open
yarons opened this issue Apr 4, 2017 · 2 comments
Open

String subtitution Bash version #13

yarons opened this issue Apr 4, 2017 · 2 comments

Comments

@yarons
Copy link

yarons commented Apr 4, 2017

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.

@dan1200
Copy link

dan1200 commented Apr 13, 2017

Depend. La quel porte ce nom

@terminalforlife
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants