蓝天

只显示指定网卡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; }'

posted on 2011-06-14 11:17  #蓝天  阅读(411)  评论(0编辑  收藏  举报

导航