Skip to content

Instantly share code, notes, and snippets.

@bonicim
Created June 14, 2023 20:19
Show Gist options
  • Select an option

  • Save bonicim/b27cf5655c313fb67f2853a684f2bf47 to your computer and use it in GitHub Desktop.

Select an option

Save bonicim/b27cf5655c313fb67f2853a684f2bf47 to your computer and use it in GitHub Desktop.

Revisions

  1. bonicim created this gist Jun 14, 2023.
    6 changes: 6 additions & 0 deletions process-dir.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    # 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"