China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 06:04
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Question: Can characters be searched in wget's echo output? View 820 Replies 5
Original Poster Posted 2009-06-28 07:42 ·  中国 辽宁 丹东 联通
初级用户
★★
Credits 116
Posts 56
Joined 2007-03-07 04:53
19-year member
UID 80966
Gender Male
Status Offline
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...
QQ=3391617
Floor 2 Posted 2009-06-28 08:41 ·  中国 吉林 延边朝鲜族自治州 延吉市 电信
银牌会员
★★★
正在学习中的菜鸟...
Credits 1,039
Posts 897
Joined 2009-03-01 15:34
17-year member
UID 140302
Gender Male
From 在地狱中仰望天堂
Status Offline
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 ]
Floor 3 Posted 2009-06-28 12:12 ·  中国 北京 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 4 Posted 2009-06-28 21:36 ·  中国 辽宁 丹东 联通
初级用户
★★
Credits 116
Posts 56
Joined 2007-03-07 04:53
19-year member
UID 80966
Gender Male
Status Offline
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 ]
QQ=3391617
Floor 5 Posted 2009-06-29 03:02 ·  中国 广东 揭阳 移动
初级用户
★★
Credits 131
Posts 72
Joined 2008-02-24 14:31
18-year member
UID 111317
Gender Male
Status Offline
Originally posted by 3391617 at 2009-6-28 09:36 PM:
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 ...


If you don't need to download it, then how do you know the download speed???
Floor 6 Posted 2009-06-29 22:32 ·  中国 北京 海淀区 联通
银牌会员
★★★
Credits 1,287
Posts 634
Joined 2007-05-02 15:06
19-year member
UID 87277
Gender Male
From cmd.exe
Status Offline
-o NUL

Just use %errorlevel% to judge it....
Forum Jump: