#!/usr/bin/env rc background=() for(repo in `{cat downstream}) { echo Updating $repo git -C $repo fetch --all --tags --prune --force & background=($apid $background) } # wait for everything to finish wait echo Done!