Skip to content

Instantly share code, notes, and snippets.

@shlomiv
Forked from andrewvc/count-clj-sloc.sh
Last active March 15, 2016 02:36
Show Gist options
  • Save shlomiv/3cd97a7b88d010c80990 to your computer and use it in GitHub Desktop.
Save shlomiv/3cd97a7b88d010c80990 to your computer and use it in GitHub Desktop.
Counting SLOC in clojure is pretty easy since the syntax is so simple.
# Count SLOC
export SLF=`mktemp -t cljslocXXXX`; find src test -name "*.clj" | xargs egrep -v "(^[[:space:]]*$|^[[:space:]]*;)" | cut -d: -f1 > $SLF && echo "Files"; uniq -c $SLF; echo "Total" `cat $SLF | wc -l`; rm $SLF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment