Bash wildcards and brace expansions

Wildcards will only expand to match the names of the files in the working directory.

  • *
  • ?
  • [abc]
  • [a-z]
  • [!a-z]


echo *

will list all the files in the working directory


But brace will expand regardless of the file existence.

echo a{b,c}d

will always echo

abd acd

Leave a Reply

Your email address will not be published. Required fields are marked *