Computer Hope
Microsoft => Microsoft DOS => Topic started by: Lemonilla on July 02, 2012, 12:50:03 PM
-
Is there a way to remove extra (blank) lines? So like
ping www.yahoo.com |find /v "Pinging" | find /v "Reply" | find /v "Ping" | find /v "Packets" | find /v "Approximate"
but without all the extra blank lines, so I can write it to a file and retreve it later?
EDIT:
still haven't found the delete button yet, but this was solved with:
ping www.yahoo.com |find "Min"
-
You sure over thought that one. ;D
-
I quite like all those pipes...
-
For loops automatically skip over any blank lines, so try something like this:
for /f "delims=" %%a in ('ping www.computerhope.com') do echo %%a >> output.txt
-
For loops automatically skip over any blank lines, so try something like this:
for /f "delims=" %%a in ('ping www.computerhope.com') do echo %%a >> output.txt
That really has nothing to do with his problem. He is just looking for the output of one line from the PING command.
Minimum = 66ms, Maximum = 161ms, Average = 126ms