Recursively changes group ownership of every folder in a current directory to the name of that folder.
find . -type d | sed -e 's/^\.\///g' -e 's/^\./avoid/g' | grep -v avoid | awk '{print $1"\t"$1}' | xargs chgrp