标签:
Mac:
$ ifconfig en0|awk -F"[ ]+" ‘/inet/{print $2}‘ fe80::a211:9bff:fe15:2976%en0 192.168.0.100
Ubuntu:
$ ifconfig eth0|awk -F"[: ]+" ‘/inet addr/{print $4}‘ 192.168.0.100 $ ifconfig eth0|awk -F"[ ]+" ‘/inet6 addr/{print $4}‘ fe80::20c:16ff:fe4c:3340/64
标签:
原文地址:http://www.cnblogs.com/Bob-wei/p/4930070.html