获取eth0的IPv4以用于脚本

结合wghao的grep | awk | sed成一个awk命令。
.

0

linux命令:ip addr show eth0 | awk '/inet / {FS = "/"; $0 = $2; print $1}' $1}' print $2; = $0 "/"; = {FS / '/inet awk | eth0 show addr ip ip addr show eth0 | awk '/inet / {FS = "/"; $0 = $2; print $1}'rootopen.com
linux命令:ip addr show eth0 | awk '/inet / {FS = "/"; $0 = $2; print $1}' $1}' print $2; = $0 "/"; = {FS / '/inet awk | eth0 show addr ip ip addr show eth0 | awk '/inet / {FS = "/"; $0 = $2; print $1}'rootopen.com
uwlw 2018-02-12 02:51:48
输出

评论

相关推荐
共收录0条命令行
这里是记录和分享命令行的地方, 所有命令行都可以进行评论、提交替代方案.

热门文章