Brace Expansion

noun

say it: “BRAYSS ik-SPAN-shun” /ˈbreɪs ɪkˈspænʃən/

The shell turning a comma list or a range in curly braces, such as {beach,city} or {01..12}, into one word for each item, even for files that don't exist yet.

What is brace expansion?

Brace expansion writes many words from one: the shell turns a comma list or a range in curly braces into one word for each item. Unlike a wildcard, it doesn't look at the folder at all, so it can name files and folders that don't exist yet.

mkdir -p receipts/2026-{01..12}   # twelve folders, 2026-01 to 2026-12

In a sentence

  • “cp lease.pdf{,.bak} is brace expansion at work: the shell writes cp lease.pdf lease.pdf.bak for you.”
  • “One line of brace expansion made a receipts folder for every month of the year.”

Level: Apprentice · More Unix terms at this level

Updated