有下列两行文本
Network:eth1 eth1:1 eth2 eth2:1
ip:103.160.102.101 103.160.102.110 192.168.102.101 169.254.181.160 127.0.0.1
想要实现:
网卡名称和ip地址一一对应显示
如下效果
eth1:103.160.102.101
eth1:1:103.160.102.110
eth2:192.168.102.101
eth2:1:169.254.181.160
如何用shell或者python实现,多谢了