expansion
Bash Assign fallback if unset
Assigns only if the scalar is unset; a set empty string is preserved.
Formal Syntax & Structure
bash syntaxbash
${p=word}Return Value
shell expansion result
Assigns only if the scalar is unset; a set empty string is preserved.
Working Example
Example Snippetbash
unset pprintf '%s\n' "${p=blue}" "$p"