I have a file of email addresses (file 1) and another file (file 2) of lines of data that contain some of these email addresses
I want to compare files and remove all lines in file 2 that have a matching email in file 1.
I know I can do a loop and use
or loop and grep each line to a new file then compare files with COMM
But I was wondering if there is a comparison method that I can kind of grep all lines in file1 to file2 and just be left with the lines from file2 that do not contain any emails in file 1
email@example.com firstname.lastname@example.org email@example.com
23456|tom|jones|test@goodemailcom|10 firstname.lastname@example.org|10 email@example.com|10 23098|mike|jones|mike@goodemailcom|10 firstname.lastname@example.org|10 email@example.com|10 firstname.lastname@example.org|10
Appreciate any knowledge anyone has.