Created
January 5, 2020 16:50
-
-
Save peterdalle/8c9b511174a36ccc61383efdb9bc7466 to your computer and use it in GitHub Desktop.
Count number of lines of code within Git project with specified file extensions
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
git ls-files | grep -P ".*(js|css|html|aspx|ascx|vb)" | xargs cat | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bash only, no git:
Windows CMD equivalent in two steps. First, combine all files into one. Then count the number of lines in file: