file - How to print a value from output -
i know how print value instead of whole output, ex.: ping google.com -t
output - reply xxx.xxx.xxx.xxx: byt=32 time=35 ttl=52
and have: "time=35" or number - "35" if know how me please me :d p.
from command line
for /f "eol=p skip=2 tokens=5 delims= " %# in ('ping google.com -t -n 10') @if "%#" neq "=" @if "%#" neq "in" @echo %#
from batch file:
for /f "eol=p skip=2 tokens=5 delims= " %%# in ('ping google.com -t -n 10') @if "%%#" neq "=" @if "%%#" neq "in" @echo %%#
if not set -n 10
you'll have wait until for /f
buffer full.
Comments
Post a Comment