sort -n +2 list.txt | awk '{print $2}' | grep - list2.txt

list.txt                        list2.txt
server1         10.1.1.1        server1         10.1.1.1
server2         10.1.1.2        server2         10.1.1.2
server3         10.1.1.3        server3         10.1.1.3
...                             server4         10.1.1.4
                                ...
What I was hoping was the last grep would take the ip addresses from the
first file search for this IP address in the second file.

It didn't do what I expected.  Right up to the last pipe works.

david



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to