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
...
cuonglm
  • 150,973
  • 38
  • 327
  • 406
Aaron Shen
  • 457
  • 1
  • 4
  • 15

2 Answers2

1

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.

cuonglm
  • 150,973
  • 38
  • 327
  • 406
0

To create .dot file =>touch .{a..h}
But all the files will be hidden, need to do ls -a to list all hidden files. enter image description here To create multiple text file => touch {a..z}.txt

  • 3
    Welcome to the site. Please don't post [screenshots of console output](https://unix.meta.stackexchange.com/questions/4086/psa-please-dont-post-images-of-text). They are often difficult to read, the content will not show up in search engine results, and the OP will need to type-copy command examples when trying to apply your solution. Instead, paste it into the question using code formatting. – AdminBee Jan 18 '21 at 14:13