Created
March 5, 2018 15:35
-
-
Save grigorescu/007a9162545e07e18cc476808ff3f193 to your computer and use it in GitHub Desktop.
This is a one-liner to find all events defined in Bro
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
for i in $(git grep -l event); do cat $i | perl -e '$input=join("", <>); for ($input=~/^\s*(event [^(]+\([^)]*?\))/mg) { s/\n\s*/ /g; s/%//g; print "$_ { }\n"; }' ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment