Answer the question
In order to leave comments, you need to log in
How to select different links from text documents?
There are two text files *.txt in them there are more than 100k links, how can I select only those links that are not in the first document if the links are scattered?
Answer the question
In order to leave comments, you need to log in
comm -1 text1.txt text2.txt >text3.txt
But you can sort both first, then compare
sort text1.txt > sort1.txt
sort text2.txt > sort2.txt
comm -1 sort1.txt sort2.txt > text3.txt
or add to the second:
comm -1 sort1.txt sort2.txt >> sort2.txt
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question