1.利用sed 取出ifconfig命令中本机的IPv4地址 [root@www ~]# ifconfig eth0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.88.11 netmask 255.255.255.0 broadcast 192.168.88.255 inet6 fe80::6dbe:4358:4300:f8ea prefixlen 64 scopeid 0x20<link> ether 00:0c:29:e9:6d:c7 txqueuelen 1000 (...