Skip to content

Instantly share code, notes, and snippets.

@droberts-sea
Last active November 3, 2016 02:10
Show Gist options
  • Save droberts-sea/ce62d5257fa0308fb26dbdae1ddda7d8 to your computer and use it in GitHub Desktop.
Save droberts-sea/ce62d5257fa0308fb26dbdae1ddda7d8 to your computer and use it in GitHub Desktop.
CHAR_COUNT=`rake routes | head -n 1 | sed 's/\(.*Prefix\).*/\1/' | wc -c | xargs`
for PREFIX in `rake routes | cut -c -${CHAR_COUNT} | awk '{$1=$1};1' | grep -v '^$' | grep -v "Prefix"` ; do
echo "\n"
echo $PREFIX
grep -n -i -I -d recurse --color=always "${PREFIX}_path" *
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment