Skip to content

Instantly share code, notes, and snippets.

@radeksimko
Last active August 29, 2015 14:04
Show Gist options
  • Save radeksimko/383a9489a93aea81728a to your computer and use it in GitHub Desktop.
Save radeksimko/383a9489a93aea81728a to your computer and use it in GitHub Desktop.
#!/usr/local/bin/bash
RESULTS=`grep ' version ' ./Casks/*.rb`
for RESULT in $RESULTS; do
FILE=$(echo $RESULT | cut -d: -f 1)
VERSION=$(echo $RESULT | cut -d\' -f 2)
OCCURENCE=$(grep -c '$VERSION' $FILE)
if [[ $OCCURENCE -ge 2 ]]; then
echo "$FILE : $OCCURENCE x"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment