天天看點

隻顯示指定網卡IP位址指令

export eth=1&&netstat -ie|awk -F'[: ]' 'begin{found=0;} { if (match($0,"eth'"$eth"'")) found=1; else if ((1==found) && match($0,"eth")) found=0; if ((1==found) && match($0,"inet addr:") && match($0,"Bcast:")) print $13; }'

<b>    本文轉自eyjian 51CTO部落格,原文連結:http://blog.51cto.com/mooon/909773</b><b>,如需轉載請自行聯系原作者</b>