編寫腳本實現查看ip的時候只看到ip地址,沒有其它的冗餘信息(想看啥就是啥)

查看ip的時候想看什麼就看什麼 其實就是把ifconfig eth0命令寫在腳本里面執行,而且在執行結果上截取想要的信息 要有這樣的一個思想 web ifconfig eth0只要ip vim show_ip.sh #!/bin/bash ifconfig eth0 | grep '\<inet\>' | cut -d " " -f 10 echo the ip of eth0 is :`ifco
相關文章
相關標籤/搜索