只获取linux ip的命令

ifconfig eth0 | awk '/inet addr/{print substr($2,6)}'
原文地址:https://www.cnblogs.com/qiumingcheng/p/5067414.html