Created
June 14, 2023 20:19
-
-
Save bonicim/b27cf5655c313fb67f2853a684f2bf47 to your computer and use it in GitHub Desktop.
Process directories using bash
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
| # Form | |
| # ls -d <directory>/* | xargs -I {} bash -c "<some command> '{}'" | |
| # example: Goes through each directory and runs git fetch on each one | |
| ls -d core/* | xargs -I {} bash -c "cd '{}' && printf 'Processing repo {} \n' && git fetch stash" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment