Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.