#!/bin/sh
ifconfig | grep ppp1
if [ $? -eq 0 ]
then
ifconfig | grep ppp1
ifconfig | grep wan1
fi
#####
执行上面shell脚本后会出现,
然后怎么将提取 ppp后面对应的数字,例如100,101,102,103.......
和wan后面100,101,102.........
两者进行比对,筛选出没有的数字。
#!/bin/sh
ifconfig | grep ppp1
if [ $? -eq 0 ]
then
ifconfig | grep ppp1
ifconfig | grep wan1
fi
#####
执行上面shell脚本后会出现,
然后怎么将提取 ppp后面对应的数字,例如100,101,102,103.......
和wan后面100,101,102.........
两者进行比对,筛选出没有的数字。