Shell – Why is Brace Expansion Not Supported?

brace-expansionshell

Do I have to do any configuration to start brace expansion? When I run mkdir {1..10}, it just creates a dir naming {1..10}.

Best Answer

While brace expansion like {1,2} originates in csh in the late 70s, and found its way to Bourne-like shells in bash/zsh/pdksh in the late 80s, early 90s, the {n1..n2} variant came later first in zsh in 1995 (2.6-beta4).

bash copied it in 2004 (3.0) and ksh93 in 2005 (ksh93r).

Probably the shell you're trying this in is neither of those or is an older version of bash and ksh93.

Related Question