Skip to content

Instantly share code, notes, and snippets.

@parndt
Created January 10, 2014 20:05
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 parndt/8361611 to your computer and use it in GitHub Desktop.
Save parndt/8361611 to your computer and use it in GitHub Desktop.
Run commands across several projects at once.
#!/bin/bash
echo "dir1 dir2 dir3 dir4"
#!/bin/bash
DIR="$(cd $(dirname "$0") && pwd)"
PROJECTS=`$DIR/projects`
for PROJECT in ${PROJECTS[@]}
do
echo "cd $(cd $DIR/$PROJECT && pwd) && $@"
cd $(cd $DIR/$PROJECT && pwd) && $@
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment