用户工具

站点工具


程序设计:bash:提取ip地址

提取 pppoe 网卡的 IP地址

/sbin/ifconfig|grep 'P-t-P'|awk '{ print $2 }' | cut -c 6-  

吧IP地址赋值给 IP 变量

IP=$(/sbin/ifconfig|grep 'P-t-P'|awk '{ print $2 }' | cut -c 6-)
程序设计/bash/提取ip地址.txt · 最后更改: 2023/06/13 05:25 由 127.0.0.1