Skip to content

Instantly share code, notes, and snippets.

@flavioamieiro
Created September 2, 2012 19:17
Show Gist options
  • Save flavioamieiro/3603445 to your computer and use it in GitHub Desktop.
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.
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
@berrondo
Copy link

berrondo commented Sep 2, 2012

poderia permitir uma igonre list.

@flavioamieiro
Copy link
Author

Corrigi o erro com nomes de diretórios que tinham espaços.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment