Created
September 12, 2018 12:42
-
-
Save stes/9a9b1f01efe7c4d61acd3a3ede888baa to your computer and use it in GitHub Desktop.
Count lines of code in a software project, filtered by file extensions
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 | |
# Seen on https://coderwall.com/p/pfm8qg/counting-lines-of-code-in-a-python-project | |
# execute with file extension as argument, e.g.: | |
# $ ./loc.sh py | |
find . -name "*.${1}" -type f -exec grep . {} \; | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment