route print

for /f "tokens=4" %%A in ('route print ^| findstr "0.0.0.0"') do echo %%A returns several lines, although the filter indicates 0.0.0.0 and there is only one line with this entry .

output

What am I doing wrong?

  • In the topic of the question ^| , and the screenshot just | . - Qwertiy

1 answer 1

What you ask, then you find:

24 0.0.0.0

Correct: findstr "\ <0.0.0.0"

  • Thank you, now it works as it should - user214690