Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
for i in *.git ; do
( cd $i
RES=$(git status | grep -E '^# (Changes|Changed|Untracked)')
STAT=""
grep -e 'Untracked' <<<${RES} >/dev/null 2>&1
if [ $? -eq 0 ] ; then
STAT="[Untracked]"
fi