I have two lists of IP addresses. I need to merge them into three files, the intersection, those from list1 only and those from list2 only.
can I do this with awk/diff or any other simple unix command? How?
The files look like this:
111.222.333.444
111.222.333.445
111.222.333.448
Thank you!
You can also merge two versions of the same document into one new document. In both cases, Word shows the differences with revision marks. Open one of the two versions of the document that you want to compare. On the Tools menu, point to Track Changes, and then click Compare Documents.
File Compare/Merge is a graphical file and folder comparison and merge tool delivered with StarTeam. It enables you to compare the contents of two files or folders, and manually or automatically merge the contents.
With the two folders selected, right-click and choose Compare (or click Merge → Compare in the menu).
If the files are sorted then
join list1 list2
will output the intersection.
join -v 1 list1 list2
will output the ones that are in list1 only.
join -v 2 list1 list2
will output the ones that are in list2 only.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With