Skip to content

Instantly share code, notes, and snippets.

@paul-jean
Created January 14, 2014 20:04
Show Gist options
  • Select an option

  • Save paul-jean/8424692 to your computer and use it in GitHub Desktop.

Select an option

Save paul-jean/8424692 to your computer and use it in GitHub Desktop.
Find twitter handles in a mail thread.
#!/bin/sh
cd /Users/rule146/Library/Mail/V2/IMAP-paul.jean.letourneau@imap.gmail.com/[Gmail].mbox/All\ Mail.mbox/A2AE7A8A-125F-45FA-A000-DDD9372AE843/Data/Messages
grep -E -H "To: hackerschool-w2014@googlegroups.com" *.emlx | grep -o -E "\\d+.emlx" | xargs -I % grep -o -E "(\\s|\()@[a-zA-z0-9]+" % | tr "(" " " | sort | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment