利用Shell命令獲取IP地址 一 :獲取單個網卡的IPv4地址,方法如下:方法一:$/sbin/ifconfig ethX | awk '/inet addr/ {print $2}' | cut -f2 -d ":" ...