![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-12 06:57 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS批处理 & 脚本技术(批处理室) » Question: Can characters be searched in wget's echo output? |
| Printable Version 821 / 5 |
| Floor1 3391617 | Posted 2009-06-28 07:42 |
| 初级用户 Posts 56 Credits 116 | |
|
The batch is as follows:
wget -T 1 -t 1 http://www.baidu.com -O - | findstr /i "saved">>ha.txt Test failed I want to get the line with the download speed... Please advise... thanks, thanks... |
|
| Floor2 Hanyeguxing | Posted 2009-06-28 08:41 |
| 银牌会员 Posts 897 Credits 1,039 From 在地狱中仰望天堂 | |
|
If find or findstr can't search through the pipe, then just use >ha.txt to output to a text file first, and then use find or findstr, or use for to parse ha.txt.
You can post the >ha.txt generated without using findstr directly, and then people can help you analyze it. [ Last edited by Hanyeguxing on 2009-6-28 at 08:46 ] |
|
| Floor3 yishanju | Posted 2009-06-28 12:12 |
| 银牌会员 Posts 1,357 Credits 1,488 | |
| Floor4 3391617 | Posted 2009-06-28 21:36 |
| 初级用户 Posts 56 Credits 116 | |
|
Many thanks to both of you for the advice!
But if I do it the way in reply #4, there will be a lot of temporary files added to the directory. Can there be as few temporary files as possible? Because I need to test many times, wget will download index.html into the directory, but I don't actually need to download it [ Last edited by 3391617 on 2009-6-28 at 22:01 ] |
|
| Floor5 lovelymorning | Posted 2009-06-29 03:02 |
| 初级用户 Posts 72 Credits 131 | |
Originally posted by 3391617 at 2009-6-28 09:36 PM: If you don't need to download it, then how do you know the download speed??? |
|
| Floor6 knoppix7 | Posted 2009-06-29 22:32 |
| 银牌会员 Posts 634 Credits 1,287 From cmd.exe | |
|
-o NUL
Just use %errorlevel% to judge it.... |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |