Created
May 20, 2018 06:36
-
-
Save AndrewThian/6086c1a1adcc9587a84820e21f7bc21d to your computer and use it in GitHub Desktop.
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
# find various file extensions and copy to provided directory | |
# https://stackoverflow.com/questions/5241625/find-and-copy-files | |
find / \( -name "*.html" \) -exec cp {} /<directory>; | |
# grep to find emails | |
# https://stackoverflow.com/questions/2898463/using-grep-to-find-all-emails | |
grep -Eiorh '([[:alnum:]_.-]+@[[:alnum:]_.-]+?\.[[:alpha:].]{2,6})' "$@" * | sort | uniq > <filename>.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment