Saturday, November 7, 2009

Find lines of code in your repository


for ext in "*.java" "*.xml" "*.css" "*.jsp" "*.js" "*.sql"
do
echo -n "$ext,$location,"
find ./$location -iname "$ext" -exec wc -l '{}' \;|gawk '{total+=$1} END{print total}'
done