特定のインターフェイスの ipconfig /all に存在するすべてのデータを取得しようとしています。
netssh やその他のプログラムを使用できません。
もちろん、grep(Windowsの場合-ただし、mgrep pcgrepなどではなくgrepのみ)、sed(同じこと..)、またはfindstrを使用できます。
皆さん、何か方法を考えませんか?
「SLOT 2 3」のすべてのデータを取得し、他のすべてのデータを失いたいです。
出力は次のようになります。
Windows IP 構成
Host Name . . . . . . . . . . . . : l-075
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : wininstall.what.com
イーサネット アダプタ SLOT 2 3:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Ethernet Adapter
Physical Address. . . . . . . . . : 00-02-C9-B5-94-E1
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::202:c9ff:feb5:94e1%24(Preferred)
IPv4 Address. . . . . . . . . . . : 12.0.0.33(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Lease Obtained. . . . . . . . . . : Thursday, January 2, 2014 12:26:18 PM
Lease Expires . . . . . . . . . . : Friday, January 10, 2014 12:26:18 PM
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 12.0.0.83
DHCPv6 IAID . . . . . . . . . . . : 436208329
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1A-25-9E-19-D4-AE-52-A1-37-E7
DNS Servers . . . . . . . . . . . : 10.4.0.0
10.4.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled
イーサネット アダプタ SLOT 2 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Ethernet Adapter #2
Physical Address. . . . . . . . . : 00-02-C9-B5-94-E0
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
イーサネット アダプタ NIC4:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet #4
Physical Address. . . . . . . . . : D4-AE-52-A1-37-EA
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
これは私が必要なものです:
イーサネット アダプタ SLOT 2 3:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Ethernet Adapter
Physical Address. . . . . . . . . : 00-02-C9-B5-94-E1
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::202:c9ff:feb5:94e1%24(Preferred)
IPv4 Address. . . . . . . . . . . : 12.0.0.33(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Lease Obtained. . . . . . . . . . : Thursday, January 2, 2014 12:26:18 PM
Lease Expires . . . . . . . . . . : Friday, January 10, 2014 12:26:18 PM
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 12.0.0.83
DHCPv6 IAID . . . . . . . . . . . : 436208329
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1A-25-9E-19-D4-AE-52-A1-37-E7
DNS Servers . . . . . . . . . . . : 10.4.0.0
10.4.0.1
NetBIOS over Tcpip. . . . . . . . : Enabled