grep -o '[[:alnum:]+\.\_\-]*@[[:alnum:]+\.\_\-]*' EMAIL_SAMPLES.TXT | sort | uniq -i
Quelle: https://rietta.com/blog/2013/10/11/grep-extract-e-mail-addresses-from-a-text-file/
grep -o '[[:alnum:]+\.\_\-]*@[[:alnum:]+\.\_\-]*' EMAIL_SAMPLES.TXT | sort | uniq -i
Quelle: https://rietta.com/blog/2013/10/11/grep-extract-e-mail-addresses-from-a-text-file/
Pass the -r option to grep command to search recursively through an entire directory tree. With this option one can search the current directory and and all levels of subdirectories by passing the -r or -R to the grep command. The syntax is:
Möchte man z.b. aus einem Log-File nur die Email-Adressen extrahieren, kann man das mit grep machen:
$ grep -i -o ‚[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}‘ file.csv
Quelle:
http://stackoverflow.com/questions/19940935/extract-email-addresses-from-text-file-using-regex-with-bash-or-command-line