Change the group of all directories (except those with a '.') under current directory tree to a group with the same name as the directory name
find . -type d | sed -e 's/\.\///g' -e 's/\./avoid/g' | grep -v avoid | awk '{print $1"\t"$1}' | xargs chgrp