idleuncle
12/26/2017 - 6:01 AM

获得主机IP地址

获得主机IP地址

ifconfig -a | grep inet | grep -v 127.0.0.1 | grep -v inet6 | awk '{print $2}' | tr -d "addr:"