#!/bin/bash cd ~/devel/FPGA for i in `find . -name .git | sort` do echo cd ~/devel/FPGA echo $i | sed -e 's/\.git$//g' | sed -e 's/^\.\///g' cd `dirname $i` git branch git log | head -1 | cut -f 2 -d " " done