Skip to content

Instantly share code, notes, and snippets.

@ravnoor
Created April 10, 2019 18:25
Show Gist options
  • Save ravnoor/3ebcbee47c42bc8e2ab0e6d0ccb17d11 to your computer and use it in GitHub Desktop.
Save ravnoor/3ebcbee47c42bc8e2ab0e6d0ccb17d11 to your computer and use it in GitHub Desktop.
extract email addresses from a text file
grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" list-emails.txt | sort | tr '[:upper:]' '[:lower:]' | uniq > emails-extracted.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment