Last active
March 10, 2018 00:31
-
-
Save suewonjp/3e3cc8b8c2ae353e30189d182b618aa9 to your computer and use it in GitHub Desktop.
Count the number of source code lines using lf.sh
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
### Count lines in every Python source file in the current project | |
count=0 | |
for f in `lf . .py`; do count=$(( $count + `cat $f | wc -l` )); done | |
echo $count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Notice that this code uses https://github.com/suewonjp/lf.sh
( lf.sh is a Bash utility to help you quickly search arbitrary files or search text from files. )