Compare two lists: what is missing from the second
difference between two lists linux | find lines in file a not in file b | compare two files line by line | comm | sort | comparecomm -23 <(sort -u all-domains.txt) <(sort -u backed-up-domains.txt)Sorts both lists and, with -23, suppresses the columns for lines only in file 2 and for common lines. What remains is what appears exclusively in the first file. Use -13 for the opposite direction and -12 for only the common entries.
Note: comm requires sorted input, hence the process substitution with sort -u, which requires Bash. Trailing spaces cause lines that look identical to be treated as different.
Also searched as
- difference between two lists linux
- find lines in file a not in file b
- compare two files line by line