dimanche 22 novembre 2020

Grep the email addresses with TLD from a file

I've a file with email addresses as follows:

example.example@gmail.com
Jhon.sam@example.com
George.callaghan@example.co.uk
Example@example.org
kelly.diana@organization.ac.in

I need the output with only TLD domains in bash script.

The output should be:

example.example@gmail.com
Jhon.sam@example.com
Example@example.org

The grep command I used is

grep -i -o '[A-Z0-9._%+-]\+@[A-Z0-9.-]\+\.[A-Z]\{2,4\}' webpage.html



Aucun commentaire:

Enregistrer un commentaire