Created
January 3, 2017 01:36
-
-
Save johncarl81/7d3d08d1dcbcbf8326ea8d4ea8cca347 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
countLines(){ | |
totalCount=0; | |
for file in `find . -name *.java`; do | |
numLines=`cat $file | sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' | sed '/^\s*$/d' | sed '/^import/ d' | sed '/^package/ d' | wc -l`; | |
totalCount=$(( $totalCount + $numLines )); | |
done | |
echo $totalCount | |
} | |
echo Source code files: | |
countLines |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment