Created
May 24, 2015 23:57
-
-
Save lopezjurip/5fd497529c81c23b1b05 to your computer and use it in GitHub Desktop.
[Bash] For-each on directories
This file contains hidden or 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
START_HERE="/Users/user/repositories"; | |
cd $START_HERE; | |
for d in $(find . -maxdepth 1 -mindepth 1 -type d); do | |
echo -e "$d"; | |
cd $d; | |
# Do a barrel roll | |
git pull; | |
cd $START_HERE; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment