expansion
Bash Require a nonempty value
Rejects an unset or empty scalar; a noninteractive shell emits a diagnostic and exits nonzero. No fallback is assigned.
Formal Syntax & Structure
bash syntaxbash
${p:?word}Return Value
shell expansion result
Rejects an unset or empty scalar; a noninteractive shell emits a diagnostic and exits nonzero. No fallback is assigned.
Working Example
Example Snippetbash
p=readyprintf '%s\n' "${p:?Required}"