shopt-option

Bash extglob

Enables extended glob syntax; turn on before parsing affected compound constructs.

Formal Syntax & Structure

bash syntaxbash
shopt -s extglob

Return Value

shell behavior

Enables extended glob syntax; turn on before parsing affected compound constructs.

Working Example

Example Snippetbash
touch a.txt b.txt c.txtbash -O extglob -c 'printf "%s\n" @(a|b).txt'
Bash Reference