3 # How big is this project anyway? Crudely estimate non-comment source lines..
5 echo -n "approximate Lisp source lines: "
6 find . -name "*.lisp" -print | xargs egrep -hs '^[ ]*[^ ;]' | wc -l
7 echo -n "approximate Lisp source non-whitespace chars: "
8 find . -name "*.lisp" -print | xargs egrep -hs '^[ ]*[^ ;]' \
9 | perl -ne 's/\s//g ; print' | wc -c
10 # some errors in Lisp counting above:
11 # * doesn't catch #| .. |#
12 # * doesn't catch #+NIL convention for commenting out forms
13 # * doesn't catch stale source files which are no longer used
15 echo -n "approximate C source lines: "
16 find . -name "*.[ch]" -print | xargs egrep -s '^[ ]*[^ /*]' | wc -l
18 # * only crudely approximates "/*"-style commenting (using the assumption
19 # that all lines beginning with "/" or "*" are beginning of comments or
20 # continuation of comments respectively)
21 # * doesn't catch #if 0 convention for commenting out blocks
22 # * doesn't catch stale source files which are no longer used
24 # There are assembler source lines, too, but there seem to be less than
25 # 1000 for each machine type. (Hardly worth considering!:-)