93 words
1 minutes
Create multiple folders using Bash

Create multiple folders using Bash#

Creating multiple folders at once can be done efficiently using a Bash script. This guide provides a simple script to achieve this.

Shell Script#

Here is a Bash script to create multiple folders:

#!/bin/bash

for folder in folder1 folder2 folder3; do
    mkdir "$folder"
done

Explanation#

  • for folder in folder1 folder2 folder3; do: This loop iterates over the list of folder names.
  • mkdir "$folder": This command creates a folder with the specified name.

Conclusion#

By using this Bash script, you can easily create multiple folders at once. This can save time and effort when organizing files and directories.


Create multiple folders using Bash
https://zxce3.net/posts/create-multiple-folders-using-bash/
Author
Memet Zx
Published at
2022-07-04