Skip to content

Instantly share code, notes, and snippets.

@mark-rushakoff
Created March 17, 2013 02:35
Show Gist options
  • Save mark-rushakoff/5179307 to your computer and use it in GitHub Desktop.
Save mark-rushakoff/5179307 to your computer and use it in GitHub Desktop.
Finding number of particular statements in a git project
#!/usr/bin/sh
git grep -c rescue . | # or whatever word it is you want
tr ':' "\t" | # translate grep -c delimiter to tab for sort
sort -nr -k2 # sort Numeric, Reverse, "kolumn" 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment