| 您的位置:首页 > 文档 > Shell > |
文章分类热门文章 |
从 ifconfig 中得到 IP地址创建:2005-10-26 00:49:46 作者:Unlinux 来自: http://www.Unlinux.com 我们知道使用 ifconfig -a 就可以得到所有网络界面的 IP 地址,但是这些 IP 地址都混在其他信息之中。 你需要从中分离出来,下面的脚本就可以帮助你直接输出 IP 地址: ifconfig | awk '/inet/{print $2}' | awk -F: '{print $2}' 转载自:http://www.unlinux.com/doc/shell/20051026/248.html 【评论】 【加入收藏夹】 【大 中 小】 【打印】 【关闭】 ※ 相关链接 无相关信息 |