Skip to content

Instantly share code, notes, and snippets.

@Paradoxis
Last active May 30, 2017 20:16
Show Gist options
  • Save Paradoxis/b5e159af0fa0c3a2077031e1151f424a to your computer and use it in GitHub Desktop.
Save Paradoxis/b5e159af0fa0c3a2077031e1151f424a to your computer and use it in GitHub Desktop.
One liner to scape all email addresses in a cloned git repository
git log --all | grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" | sort -u
@Paradoxis
Copy link
Author

Paradoxis commented Jun 27, 2016

Usage:

$ git clone git@github.com:user/repository.git
$ cd repository/
$ git log --all | grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" | sort -u > email-addresses.txt
$ cat email-addresses.txt
foo@gmail.com
bar@gmail.com
baz@gmail.com
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment