Consider I have two text files.
First File name - "Emails.txt" with the following data:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Second text file - "Roles.txt" with the following strings:
sale@
info@
all@
help@
How to delete all the lines in the 1st text file "Emails.txt" if it matches ONLY EXACT stings of any line present in the second text file "Role.txt"?
The desired output of the new file should be:
[email protected]
[email protected]
I tried using
grep -vf Role.txt Emails.txt
But, this command also deletes the line if it matches all the characters of the Role.txt.
I want to remove only it matches EXACT as per Role.txt file, and swip everything if there are other characters before the desired string.
Here someone gave a similar solution for removing line matching EXACT string at the end of each lines, but in this I need the regrex to so the same at the beginning of each lines.