编写脚本实现查看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
相关文章
相关标签/搜索