So I have a file1.txt with a list of names, and a file2.txt with another list of names and I need a list with the names that are in both files.
I tried grep-f file1.txt file2.txt > newlist.txt
but for some reason it isn't working, and the newlist.txt has names that are not in file1.
Does anyone know why this is happening and what i could do to get only the names that are on both lists?
thank you.