Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Count lines and references in a bunch of projects' docs
for dir in `ls -d */`;
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 ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.