Last active
January 15, 2017 04:19
-
-
Save rm-code/17f1987fddcd937a04d0 to your computer and use it in GitHub Desktop.
Bash one-liners to count lines of code.
This file contains hidden or 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
# Only returns the total lines of code. | |
# Remove the tail call to show a more verbose output. | |
wc -l $(find . -name '*.lua') | tail -1 | |
# Add more files as parameters. | |
wc -l $(find . -name '*.lua' -or -name '*.sh' ) | tail -1 | |
# This would return the lines of code of all .lua files in your repository. | |
# Simply exchange .lua with the extension you want to search for. | |
wc -l $(git ls-files | grep -e '.*\.lua' ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment