What does the following bash syntax mean?
MY_VAR=${MY_VAR:-"mystring"}
Thank you in advance.
What does the following bash syntax mean?
MY_VAR=${MY_VAR:-"mystring"}
Thank you in advance.
See Parameter Expansion in man bash
:
${parameter:-word}
Use Default Values. If
parameter
is unset or null, the expansion ofword
is substituted. Otherwise, the value ofparameter
is substituted.