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

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -