Generate multiple words from a brace expression.

Section: Globbing and Brace Expansion

Brace expansion

bash
bash
printf '%s
' file-{a,b,c}.txt
Explanation

Brace expansion happens before pathname expansion.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Globbing and Brace Expansion
Sequence expansion
Generate a numeric sequence.
OpenIn sheetbashsame section
Match files with glob
Expand a glob to matching files.
OpenIn sheetbashsame section
Enable nullglob
Expand unmatched globs to nothing.
OpenIn sheetbashsame section
Include dotfiles in globs
Make globs match dotfiles too.
OpenIn sheetbashsame section
Assign variable
Assign a shell variable.
Literal single-quoted string
Single quotes prevent all expansion.