0

I want to create a bunch of dot files using brace expansion, but it doesn't work:

touch .{a..h}

the result is a file .{a..h} is created instead of

.a
.b
.c
...
  • 1
    What is your shell? – cuonglm Dec 1 '15 at 8:41
  • I am using zshell – Aaron Shen Dec 1 '15 at 8:48
  • Works fine for me in zshell. Which version are you using? – Simon Klaver Dec 1 '15 at 8:51
  • zsh 5.0.8 (x86_64-apple-darwin14.3.0) – Aaron Shen Dec 1 '15 at 8:54
  • What does zsh -fc 'echo $ZSH_VERSION .{a..h}' output? – Stéphane Chazelas Dec 7 '15 at 17:44
0

Maybe you have the ignorebraces enabled, so zsh do not perform brace expansion:

$ setopt ignorebraces
$ print -rl -- {1..10}
{1..10}

So try setopt noignorebraces and redo the task.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.