ifconfig|sed -nr "2s/[^0-9]+([0-9.]+).*/\1/p"
利用sed 取出ifconfig命令中本机的IPv4地址
原文:https://www.cnblogs.com/qianyuezhan/p/13285520.html