Last active
February 17, 2017 14:26
-
-
Save loleg/1b8d5d7fe4c05a19a04bd0c899e57e91 to your computer and use it in GitHub Desktop.
Count lines and references in a bunch of projects' docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for dir in `ls -d */`; | |
do | |
cd $dir/docs | |
echo Total lines in ${dir%%/}: | |
find . -type f -exec cat {} + | wc -l | |
echo References of ${dir%%/}: | |
grep -ori ${dir%%/} * | wc -l | |
cd .. && cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment