Created
June 14, 2017 21:24
-
-
Save rileyjshaw/f5302c602cb493bf18b39cd69fb97b4f to your computer and use it in GitHub Desktop.
Used this for a quick audit at work. Not comprehensive, but uncovered some good leads nevertheless.
This file contains hidden or 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 match in $(egrep -roi '([_a-z])+: function' javascript | cut -d : -f 1-2); do | |
file=`echo $match | cut -d : -f 1` | |
fn=`echo $match | cut -d : -f 2` | |
count=`grep -r $fn javascript | wc -l` | |
if [[ $count -lt 2 ]]; then | |
echo "$file:$fn" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment