Categories
Tags
a Accessibility Advanced Algorithms Alias Authentication Bash bash Basics Beginners Best Practices Big O bun cat cd CLI Cloudflare Comments Container Elements Container Queries cp css CSS Data Structures deno DevOps 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 Open Source Package Manager picture pm2 Privacy Productivity programming Programming pwd Remote Access Responsive Design Responsive Images rmdir Runes Scalability section Security Self-hosting Semantic HTML shell Shell Shell Script Shells srcset State Management Structure Svelte Svelte 5 Svelte Store SvelteKit svg Tables tail Text Formatting Tools touch Troubleshooting Tunnel Tutorial TypeScript Unix ux Video Processing 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/