• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

Easy one...

The question is not much about c++.

In console mode under win9x,sometimes I run an executable which will print many information in the DOS-like console window.The problem is the information always longer than one screen,so when the printing ends,I can only see the last screen of all things got printed.
How to read it screen by screen,or to write it to a file to read all it prints to console window?

Any advice is great!
Thank you
0
geeboy
Asked:
geeboy
1 Solution
 
mournbladeCommented:
<program> > outputfile.txt

e.g. dir > dir.txt

it would put the result you see on standard output (the screen) in the dir.txt file
0
 
rgoughCommented:
.. or pipe it through the "more" command:

e.g. dir | more

will send a page worth of output to the console at a time.
0
 
zoushenCommented:
 

  U can try ***.exe > record.txt

or like ***.exe >> record.txt


but such ways would not succeed every
time.


for more help , you should study some
old dos commands  .
0
 
TalmashCommented:
hi ,
try one of these :

file_name > text_file.txt

*** such command change the standard output from the screen to the file you gave its name after the ">" sign .

As I understood you run over PC station using Dos shell (screen) ,

if you're using linux/unix shell you can write just the same as above or use the pipe tool (more or + in most environments )

file_name | more
or
file_name | +


regards ,

Talmash
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now