Created
September 2, 2012 19:17
-
-
Save flavioamieiro/3603445 to your computer and use it in GitHub Desktop.
Imprime total linhas nos arquivos de cada diretório a partir do atual.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type d | while read DIR | |
do | |
echo "$DIR" | |
find "$DIR" -maxdepth 1 -type f -exec wc -l {} \; | awk '{loc += $1} END {print loc}' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Corrigi o erro com nomes de diretórios que tinham espaços.