方法1:sed查询打印[root@Linux9~]#ifconfigeth0|grep"inetaddr:"|sed‘s/Bcast.*$//‘g|sed‘s/.*://g‘
192.168.25.57方法2:awk查询打印[root@Linux9~]#ifconfigeth0|grep"inetaddr:"|sed‘s/Bcast.*$//‘g|awk-F":"{‘print$2‘}
192.168.25.57
分类:
其他好文 时间:
2016-02-17 13:12:12
阅读次数:
113