Skip to content

Instantly share code, notes, and snippets.

@loleg
Last active February 17, 2017 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loleg/1b8d5d7fe4c05a19a04bd0c899e57e91 to your computer and use it in GitHub Desktop.
Save loleg/1b8d5d7fe4c05a19a04bd0c899e57e91 to your computer and use it in GitHub Desktop.
Count lines and references in a bunch of projects' docs
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