I'm trying to make a bash script that would make a series of directories and requesting a parameter of how many directories should be created.
$> ./createDir.sh 5
$> ls
ex_01
ex_02
ex_03
ex_04
ex_05
I tried using mkdir ex_{01..$1} but it does not seem correct. How could I make this work (without using any loop)?
#! /bin/bash
with#! /bin/zsh
– Stéphane Chazelas Oct 04 '16 at 12:57for i in {1..$N}
andfor i in $(seq 1 1 $N)
– Stéphane Chazelas Oct 04 '16 at 13:00