|
用 shell 实现
./ifconfig
ppp0 Link encap oint-to-Point Protocol
inet addr:61.190.82.35 P-t-P:24.24.24.24 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:3634 errors:0 dropped:0 overruns:0 frame:0
TX packets:3511 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:2586031 (2.4 Mb) TX bytes:678348 (662.4 Kb)
//
想获得 61.190.82.35
我使用 ./ifconfig | grep '61.190' | colrm 1 14 | colrm xx xx
问题是这个可以地址可以改变为:
61.190.xxx.xxx
colrm 就无法处理了!
//
不知道有没有其他方法? |
|