Last active
August 29, 2015 14:01
-
-
Save sebmaynard/5604595ba606d28548a9 to your computer and use it in GitHub Desktop.
A fast, simple find/grep wrapper targetted at Erlang projects
This file contains 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
#!/bin/bash | |
# speed things up quite a lot! | |
export LC_ALL=C | |
# uses -P (perl regular expressions) for speed | |
find ./ -type f ! \ | |
-path "*/deps/*" ! \ | |
-path "*/caerldeps/*" ! \ | |
-path "*/_rel/*" ! \ | |
-path "*/log/*" ! \ | |
-path "*.beam" ! \ | |
-path "*.dtl.erl" ! \ | |
-path "*/.eunit/*" ! \ | |
-path "*.tbl" ! \ | |
-path "*.jar" ! \ | |
-path "*.deps_plt" ! \ | |
-path "*.sys_plt" ! \ | |
-path "*/erl_crash.dump" ! \ | |
-path "*.dll" ! \ | |
-path "*/notes.html" ! \ | |
-path "*/target/streams/*/out" -print0 | xargs -P 4 -0 grep "$@" -P -nr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment