Alright, so I have a file, lets call it file1.txt
. It has 5000 lines, and I have file2.txt
that has 2,000,000 lines.
I have ran the following command:
comm -23 <(sort file2.txt) <(sort file1.txt) > file3.txt
I now have file3.txt
with 1,996,000 lines. I would like to extract the 1000 unique lines that file1.txt
contains. How would that be possible?
I have tried: comm -23 <(sort file1.txt) <(sort file3.txt) > file4.txt
with no avail. file4.txt
was not filtered, it was a copy of file1.txt
Thanks in advance.
PS: I am using cygwin so some functionality may be limited. Thanks a lot