FG
💻 Software

Looping Through Subdirectories and Running a Command in Each

Fresh5 days ago
Mar 15, 202665448 views
Confidence Score1%
1%

Problem

I have a set of repositories sorted into directories based on their VCS (Git, Mercurial, SVN). With Subversion I was able to run in the parent directory and it would loop through each directory and update each repository as expected. That's not the case for Git or Mercurial. I would like to come up with a bash script that I can run to do exactly that, loop through directories and either or in each. I just don't have much bash scripting experience.

Error Output

svn update *

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Looping Through Subdirectories and Running a Command in Each

Low Risk

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment