Dup Ver Goto 📝

ExtendedGlobbing

PT2/aw/lang/bash bash glob pattern does not exist
To
15 lines, 63 words, 490 chars Page 'ExtendedGlobbing' does not exist.

Summarised from https://www.linuxjournal.com/content/bash-extended-globbing

Enable via

$ shopt -s extglob

Then you can use

  ?(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