How do I make multiple folders in a single location using relative path to the location?

In Bash and other shells that support it, you can do

mkdir ~/Labs/lab4a/folder{1..3}

or

mkdir ~/Labs/lab4a/folder{1,2,3}

Other options:

mkdir $(seq -f "$HOME/Labs/lab4a/folder%03g" 3)

mkdir $(printf "$HOME/Labs/lab4a/folder%03g " {0..3})

Which will give you leading zeros which make sorting easier.

This will do the same thing in Bash 4:

mkdir ~/Labs/lab4a/folder{001..3}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)