Categories
Tags
a Accessibility Advanced Algorithms Alias Bash bash Basics Beginners Best Practices Big O bun cat cd CLI Comments Container Elements Container Queries cp css CSS Data Structures deno Doctype Download Editors Error Examples Features figure File Watching Filesystem fish Fish Shell footer frontend Guide header Hello World History Homebrew HTML HTML5 humor img javascript JavaScript Learning less Links linux Linux ls macOS Media Queries meta Mobile-First mv Netcat Networking Node.js npm Package Manager picture pm2 Productivity programming Programming pwd Responsive Design Responsive Images rmdir Scalability section Semantic HTML shell Shell Shell Script Shells srcset State Management Structure Svelte Svelte Store SvelteKit svg Tables tail Text Formatting Tools touch Troubleshooting Tutorial Unix ux Vim web development Web Development web-development webdev
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/