`

SHELL 常用脚本

阅读更多

1、提取IP地址

ifconfig eth1 | grep 'inet' | sed   's/^.*addr://g'   | sed 's/Bcast.*$//g'

 

ifconfig eth0|grep “inet addr”|awk ‘{print $2}’|awk -F”:” ‘{print $2}’

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics