Skip to content

Instantly share code, notes, and snippets.

@sylvaincombes
Created October 23, 2017 10:29
Show Gist options
  • Save sylvaincombes/3e5ac4b8e5adaee79e1804d85774f8ba to your computer and use it in GitHub Desktop.
Save sylvaincombes/3e5ac4b8e5adaee79e1804d85774f8ba to your computer and use it in GitHub Desktop.
Bash, go in each directory to launch a command, one liner style
# One liner style
# find all directory with name "*myDirectoryCommonName*", go in the directory, launch commands, repeat
for D in `find . -maxdepth 1 -type d | grep myDirectoryCommonName`; do cd "${D}" && git pull && ./app/bin/2017-06-migration.sh && cd ..; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment