Bash - Count Lines
From Superk
This one-liner will read in the contents of the current directory and count the number of lines in all the files producing a total sum. (Change 'ls *.php' to just 'ls' to count all files)
count=0; for i in $(ls *.php); do count=$(( $count + $(cat $i|wc -l) )); done; echo $count
