Skip to content

Instantly share code, notes, and snippets.

@paulvollmer
Created April 4, 2013 09:45
Show Gist options
  • Save paulvollmer/5309143 to your computer and use it in GitHub Desktop.
Save paulvollmer/5309143 to your computer and use it in GitHub Desktop.
#!/bin/sh
loc=0
dirs="src foo bar"
for dir in $dirs; do
files=`find $dir -type f | egrep -v "svn" | egrep -v "(DS_Store|pdf|svn|sql|png|txt|swfupload)"`
lines=`wc -l $files | tail -1 | sed "s/total//g"`
loc=$(($loc + $lines))
done
echo "Lines of code: $loc (not including libraries / externals)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment