I have a csv file which has the list of the following ip addresses:
SSH IP NFS IP iSCSI IP
10.xxx.xxx.aaa 172.xxx.xxx.aaa 172.yyy.xxx.aaa
10.xxx.xxx.bbb 172.xxx.xxx.bbb 172.yyy.xxx.bbb
10.xxx.xxx.ccc 172.xxx.xxx.ccc 172.yyy.xxx.ccc
10.xxx.xxx.ddd 172.xxx.xxx.ddd 172.yyy.xxx.ddd
... ... ...
... ... ...
I want to compare the last octets in SSH IP, NFS IP and iSCSI IP and if they match, i want to execute a few commands, by ssh'ing into the box.
I want to know the most efficient way to compare the last octets, considering my case. Any help around this would be highly appreciated.
P.S. I do not have any problems in ssh'ing into the box, i am planning to use the paramiko library.