Recently I came across this syntax:
${reportName,,}
I could not find anything by googling, so does anyone know what does those ,, mean?
Logical OR Operator ( || ) in Bash It is usually used with boolean values and returns a boolean value. It returns true if at least one of the operands is true. Returns false if all values are false.
Here are all the ways in which variables are substituted in Shell: ${variable} This command substitutes the value of the variable. ${variable:-word} If a variable is null or if it is not set, word is substituted for variable.
It has no special meaning. The command redirects to a file called ,update . Show activity on this post. A comma can be used in brace expansion, but there are no braces in the example you show.
$# is the number of positional parameters passed to the script, shell, or shell function. This is because, while a shell function is running, the positional parameters are temporarily replaced with the arguments to the function. This lets functions accept and use their own positional parameters.
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
${var^} ${var^^} ${var,} ${var,,}
Note: "Parameter Expansion" is present in man bash
.Search for it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With