What does 2 commas after variable name mean in bash?
LinuxBashShellLinux Problem Overview
Recently I came across this syntax:
${reportName,,}
I could not find anything by googling, so does anyone know what does those ,, mean?
Linux Solutions
Solution 1 - Linux
This is called "Parameter Expansion" available in bash version 4+ . To change the case of the string stored in the variable to lower case.Eg:
var=HeyThere
echo ${var,,}
heythere
You may want to try some additional commands and check the effect : [source][1]
${var^}
${var^^}
${var,}
${var,,}
Note: "Parameter Expansion" is present in man bash
.Search for it.
[1]: http://wiki.bash-hackers.org/syntax/pe