#!/bin/sh cd ../.. for d in *; do echo "current directory: $d" cd "$d" # git pull # git gc # git clean -fx git status cd .. done