I have 2 large text files file1.txt
and file2.txt
Each file contains a line separated list of names e.g.
file1.txt
Beth
james
James
paul
Paul
sally
file2.txt
James
Paul
Sally
I want to produce a file containing names unique ONLY to file1.txt
while also ignoring case, so in the above example I want a file produced which would look like this:
comparison.txt
Beth
Using the command comm -23 file1.txt file2.txt > comparison.txt
produces an incorrect result:
Beth
james
paul
sally
Using the -i
command also produces an incorrect result:
Beth
James
Paul
What am I missing here?