#!/usr/bin/env bash # Go into each subdirectory and run a git stat for i in $(ls); do if [[ -d $i/.git ]]; then stat=$(git -C $i diff --stat) if [[ -n $stat ]]; then echo $i chars=${#i} for (( j = 0; j < $chars; j++ )); do echo -n "=" done echo git -C $i diff --stat echo fi fi done