shopt-option
Bash failglob
An unmatched pattern causes an expansion error; the affected command is not executed. Takes precedence over nullglob.
Formal Syntax & Structure
bash syntaxbash
shopt -s failglobReturn Value
shell behavior
An unmatched pattern causes an expansion error; the affected command is not executed. Takes precedence over nullglob.
Working Example
Example Snippetbash
bash -c 'shopt -s failglob; printf "%s\n" *.missing' 2>/dev/nullprintf 'status=%s\n' "$?"