Created
July 22, 2019 19:02
-
-
Save kevinhooke/3a7b7accbdf0488ccffc9ea4a9396df3 to your computer and use it in GitHub Desktop.
bash iterate through all dirs and execute some action in that dir
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 | |
for d in *; do | |
if [ -d ${d} ]; then | |
echo $d | |
cd $d | |
// do something with $d here | |
cd .. | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment