Created
August 1, 2014 05:59
-
-
Save dreampuf/8eba0e27dfb5495acc8c to your computer and use it in GitHub Desktop.
Count a folder text file line count group by postfix
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
#!/bin/bash | |
find . -type f -print | xargs wc -l | while read count path; do echo ${path##*\.} $count; done | awk '{arr[$1] += $2} END {for (key in arr) printf("%s\t%s\n", key, arr[key])}' | sort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
result