brace expansion

The first expansion, which turns a pattern like {a,b} or {1..3} into several words, whether or not matching files exist.

In more detail

file.{txt,md} becomes file.txt file.md, and {1..5} counts from 1 to 5. Unlike globbing it does not look at the disk at all. It is a bash feature, not POSIX, and variables inside the braces are not expanded in time for it to use them.

Examples

mkdir -p notes/{drafts,archive}
echo {1..3}

Related terms

Taught in

References