Skip to content

Instantly share code, notes, and snippets.

@lopezjurip
Created May 24, 2015 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lopezjurip/5fd497529c81c23b1b05 to your computer and use it in GitHub Desktop.
Save lopezjurip/5fd497529c81c23b1b05 to your computer and use it in GitHub Desktop.
[Bash] For-each on directories
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