这个
netsh
命令输出以下内容:
C:\> netsh int ip sh route store=persistent | findstr -v 0.0.0.0/0 | more +3
Oui Autre 1 192.168.10.128/26 0 192.168.10.1
我正在尝试获取
netsh
用一个
for/f
循环:
C:> for /f "skip=3 tokens=4" %f in ('netsh int ip sh route store=persistent ^| findstr -v 0.0.0.0/0') do @echo %f
C:>
但这是可行的:
C:> for /f "tokens=4" %f in ("col1 col2 col3 col4") do @echo %f
col4
EDIT0:此文档可以帮助:
https://ss64.com/nt/syntax-esc.html
你能帮助我吗?