Created
September 3, 2013 11:17
-
-
Save johnpaulhayes/6422556 to your computer and use it in GitHub Desktop.
Perform an action for each directory found in a given location
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
#! /bin/bash | |
# Description: For each directory in ~/Development, descend into it, pull the latest from git and come back out of it. | |
find ~/Development/. -type d -print0 -maxdepth 1 | while IFS= read -r -d '' dir | |
do | |
cd $dir | |
git pull | |
cd ../ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment