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 08:55
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » [Help] Application of redirection View 1,370 Replies 2
Original Poster Posted 2003-03-12 00:00 ·  中国 上海 普陀区 电信
初级用户
Credits 118
Posts 4
Joined 2003-03-12 00:00
23-year member
UID 1103
Gender Male
Status Offline
I'm currently running into a difficult problem.
I want to use another person's program output (a massive text stream), and write my own program to analyze this text stream.
I used vbdos provided on this site, but when using the input statement it leaves traces of the input on the screen. For massive amounts of data, this seriously affects the program's execution speed.

I hope some expert can point me in the right direction!!!!!!!!
I'll be grateful to tears! If you're in Shanghai, I'll treat you to a meal! I definitely won't go back on my word.
Floor 2 Posted 2003-03-12 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
You can use the DOS redirection command.
Usage: filename1>filename2
Explanation: filename1 is the other person's program
   filename2 is the filename where the data output by the other person's program is saved.
This way, the data output by the other person's program (which would originally be output to the screen) can be redirected to a file.
The contents of this file are everything that would originally have been displayed on the screen.

Not sure whether explaining it this way is of any help to you.
But if that other person's program you mentioned does not output data fully automatically, then I guess this trick won't work.
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 3 Posted 2003-03-13 00:00 ·  中国 上海 普陀区 电信
初级用户
Credits 118
Posts 4
Joined 2003-03-12 00:00
23-year member
UID 1103
Gender Male
Status Offline
Thanks!!! This trick works quite well, kind of like a Windows buffer file. Before I have any other way, I'll go with your suggestion!!

I don't want to leave traces on the disk, so I want to use a pipe directly: if this file gets saved, it may be over a hundred megabytes! Ah, what a headache. By then, even if I read it back out for analysis, it'll still take some time. Think about it, if I redirect the output to a file now, then when the other person's program runs, with the time needed to save to disk added in, under a small data volume, DOS takes about 45s to run.
Forum Jump: