Skip to content

Instantly share code, notes, and snippets.

@grigorescu
Created March 5, 2018 15:35
Show Gist options
  • Save grigorescu/007a9162545e07e18cc476808ff3f193 to your computer and use it in GitHub Desktop.
Save grigorescu/007a9162545e07e18cc476808ff3f193 to your computer and use it in GitHub Desktop.
This is a one-liner to find all events defined in Bro
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