I have a list from an inventory and another list from management. I'm trying to find the IP's that are similar between both files then output that is similar into another file:
I tried using diff but, the output did not made sense.
diff -buy list1 list2
then I tried to use egrep using IP's from list 1but, I think I used the wrong syntax.
egrep -o `192.168.*|192.1.69` list2
not sure what to use correctly
like: list 1 maybe have:
192.168.1.1 192.168.1.2 192.168.1.3 192.168.2.1
and I want to try to find this IPs in list2