Created
June 7, 2015 16:28
-
-
Save olivergondza/ba0d967c5f5616f6baf5 to your computer and use it in GitHub Desktop.
Detect non-static classes in java code
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
for f in `find $1 -iname *.java`; do | |
out=`grep "class\ " $f | grep -v -e "[[:space:]]*\*" -e "[[:space:]]//" | sed '1d' | grep -v -e static` | |
if [ $? == 0 ]; then | |
echo $f | |
echo $out | grep --color=auto class | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment