I'm trying to check every line of a file and see if it has the proper formatting for an email address.
I'm looking for email addresses in the format of
I'm not concerned about the user ID. What I want to check is that the domain does not have invalid characters such as an underscore _ in it and count them.
Checking if it has a @ in it
grep -c "@" testing.txt
grep '@.*_' testing.txt