Skip to content

Instantly share code, notes, and snippets.

@mtholder
Last active August 29, 2015 14:01
Show Gist options
  • Select an option

  • Save mtholder/539efd0375aff15bf2fd to your computer and use it in GitHub Desktop.

Select an option

Save mtholder/539efd0375aff15bf2fd to your computer and use it in GitHub Desktop.
If you have checked the main open tree of life repos out into a directory which you lovingly call OPEN_TREE_REPO_ROOT in your env, then this will run grep on the files that appear to be java, python, or shell scripts in those repos.
#!/bin/sh
for repo in api.opentreeoflife.org deployed-systems gcmdr opentree ot-base oti ott peyotl phylografter taxomachine reference-taxonomy treemachine ;
do
for suffix in .java .py .sh
do
find "$OPEN_TREE_REPO_ROOT/$repo" -name "*$suffix" -exec grep -H $@ {} \; | sed -e "s+$OPEN_TREE_REPO_ROOT/++"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment