Em termos simples, globbing refere-se à correspondência de padrões. Bash usa globbing simples como, echo l*que se expandem para a lista de arquivos no diretório atual que começam com letra l. Obviamente, como você pode imaginar, é simples e limitado.
Enter extglob. Como você pode imaginar, significa extended globbing. Esta opção permite uma correspondência de padrão mais avançada. De man bash:
extglob If set, the extended pattern matching features described
above under Pathname Expansion are enabled.
E um pouco antes disso:
If the extglob shell option is enabled using the shopt builtin, several
extended pattern matching operators are recognized. In the following
description, a pattern-list is a list of one or more patterns separated
by a |. Composite patterns may be formed using one or more of the
following sub-patterns:
?(pattern-list)
Matches zero or one occurrence of the given patterns
*(pattern-list)
Matches zero or more occurrences of the given patterns
+(pattern-list)
Matches one or more occurrences of the given patterns
@(pattern-list)
Matches one of the given patterns
!(pattern-list)
Matches anything except one of the given patterns
Existem inúmeras maneiras pelas quais extglobpode ser usado. Alguns bons exemplos são fornecidos no Linux Journal e no wiki de Greg .