Skip to content

Instantly share code, notes, and snippets.

@wayou
Created October 25, 2018 07:45
Show Gist options
  • Save wayou/39d1224b76f490890b1f08500d739361 to your computer and use it in GitHub Desktop.
Save wayou/39d1224b76f490890b1f08500d739361 to your computer and use it in GitHub Desktop.
pirnt file number for each extension and the total file number
# with git:
git ls-files | wc -l | awk '{$1=$1;print $1 " total"}';git ls-files| sed 's/.*\.//' | sort | uniq -c | sort -r|awk '{$1=$1;print}'
# without git
find . -type f | wc -l | awk '{$1=$1;print $1 " total"}'; find . -type f | sed 's/.*\.//' | sort | uniq -c | sort -r|awk '{$1=$1;print}'
@wayou
Copy link
Author

wayou commented Oct 25, 2018

sample result:

29 total
6 tsx
6 bazel
3 scss
3 md
2 json
1 ts
1 sh
1 lock
1 js
1 html
1 gitignore
1 clang-format
1 bazelrc
1 WORKSPACE

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