Skip to content

Instantly share code, notes, and snippets.

@shlomiv
shlomiv / count-clj-sloc.sh
Last active March 15, 2016 02:36 — forked from andrewvc/count-clj-sloc.sh
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