Consider I have two text files.
First File name - "Emails.txt" with the following data:
email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com
Second text file - "Banned.txt" with the following strings:
@gotmail.com @cmail.com @uor.edu
How to delete all the lines in the 1st text file "Emails.txt" if it matches the stings of any line present in the second text file "Banned.txt"?
The desired output of the new file should be:
firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com
Can this be done using SED or awk in Linux? Can you please suggest how to do this?