- syntax as per Bourne/Korn shell
${parameter:+altValue}
If parameter is unset or null, nothing is substituted.
Otherwise the \c altValue is substituted.
- syntax as per Bourne/Korn shell
${parameter:-defValue}
If parameter is unset or null, the \c defValue is substituted.
Otherwise, the value of parameter is substituted.
- eg,
"$USER $(PWD) $USER" -> "username $(PWD) $USER"
instead of
"$USER $(PWD) $USER" -> "username $(PWD) username"
this is noticable in some dynamicCode usages
STYLE: consolidate all string expand code into stringOps