Skip to content

Instantly share code, notes, and snippets.

@scrain
Created August 23, 2016 15:16
Show Gist options
  • Save scrain/1508f843159af266d87e9b6bab8fbacc to your computer and use it in GitHub Desktop.
Save scrain/1508f843159af266d87e9b6bab8fbacc to your computer and use it in GitHub Desktop.
bash - run cmd in each sub dir
for d in ./*/ ; do (cd "$d" && echo "$d" && somecommand ); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment