Created
March 29, 2023 09:40
-
-
Save Apipa169/d1173c4ca4d122509de63cdb25ce78cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
folders=( | |
folder1 | |
folder2 | |
) | |
command=$1 | |
for folder in "${folders[@]}" | |
do | |
echo "Executing command in folder $folder..." | |
cd "$folder" | |
eval "$command" | |
cd "../" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment