Count number of lines of code in directory of .java files

for i in $(find . | grep .java); do wc -l $i; done | cut -f 1 -d " " > numbers
for i in $(cat numbers) ; do SUM=$(( $SUM + $i )) ; echo $SUM ; done
Posted in Science, the Universe and God

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>