标题: 请教FOR命令获取备用DNS方法
[打印本页]
作者: jiulong
时间: 2008-4-9 03:34
标题: 请教FOR命令获取备用DNS方法
一台机两个网卡
Windows IP Configuration
Host Name . . . . . . . . . . . . : ***
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8169/8110 Family Gigabit Ethernet NIC
Physical Address. . . . . . . . . : 00-19-E0-75-2E-83
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.*
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.250
DNS Servers . . . . . . . . . . . : 202.96.134.133
202.96.128.86
Windows IP Configuration
Host Name . . . . . . . . . . . . : ***
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接 2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8169/8110 Family Gigabit Ethernet NIC
Physical Address. . . . . . . . . : 00-19-E0-75-2E-83
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.*
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.250
DNS Servers . . . . . . . . . . . : 202.96.134.133
202.96.128.86
一台机一个网卡,但是上面内容的备用DNS不是固定在18行
并且我绝对不能用find "202.96.128.86"这么弱智的方法,这样我用FOR命令就失去了它智能获取的意义了。
请高手帮忙解决
作者: abcd
时间: 2008-4-9 03:44
ipconfig /all|findstr /r /c:"^ *"
作者: jiulong
时间: 2008-4-10 07:28
这条命令太厉害了,用来做成ARP是不是真的就万无一失了?
可惜我只能加4分,有更多分就都加给你了。
可惜不明白FINDSTR使用方法,只熟悉FIND命令,惨愧,能否解释下FINDSTR /R /C。。。这些代表的意思,用/?看得不是很明白