Last active
August 29, 2015 14:06
-
-
Save dobrokot/82ade3a1c399573922b8 to your computer and use it in GitHub Desktop.
This file contains 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
( | |
find . -name '*.cpp' -or -name '*.h' | xargs grep -E '^ *[a-zA-Z0-9< >,:_]+ +[a-zA-Z0-9_]+;$' -o -h | grep '<' | grep '>' ; | |
find . -name '*.cpp' -or -name '*.h' | xargs grep -E '^ *[a-zA-Z0-9_]+ +[a-zA-Z0-9_]+;$' -o -h | |
) | awk '{print $2}' | sort -u | tr -d ';' > ../names.txt | |
find . -name '*.cpp' -or -name '*.h' | xargs fgrep --word-regexp -f ../names.txt -oh | sort | uniq -c | awk '$1 <= 2' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment