Answer the question
In order to leave comments, you need to log in
Linux: how to get the difference between two lists?
There are two files with lists of hosts (IP Addr key field). How can you get the difference difference between these lists without using databases or programming languages (ie purely BASH)?
Using join and paste has not succeeded so far.
Answer the question
In order to leave comments, you need to log in
diff -y ./ip.dat ./ip2.dat --suppress-common-lines
or simplydiff ./ip.dat ./ip2.dat --suppress-common-lines
First sort (if they are unordered) is the sort command, then difference is the diff command.
sort, diff, uniq, awk - depending on what kind of files and in what form the data is.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question