Answer the question
In order to leave comments, you need to log in
How to subtract one file from another?
There are two txt files, in which logins are recorded each from a new line. Only 3 million lines in each.
How can one subtract the other from one?
That is, in the first file you need to leave those logins that are NOT present in the second.
Is there any Windows application to solve such problems?
Answer the question
In order to leave comments, you need to log in
Execute from CMD.EXE (or batch file): Findstr
utility switches used :
/B Look for pattern only at the beginning of lines.
/E Look for pattern only at the end of lines.
/V Print lines that do not match the search strings.
/G:file Get lines from the given file
For Linux, this is done with the following command:
-v Invert the sense of the match, ie look for things not matching.
-x When matching a pattern, require that the pattern matches the whole line, ie not just anywhere on the line.
-F When matching a pattern, treat it as a fixed string, ie not as a regular expression.
-f Read patterns from the given file (forbidden_logins.txt).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question