Solved

Easy one...

Posted on 2000-05-12
4
201 Views
Last Modified: 2010-04-02
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
Comment
Question by:geeboy
4 Comments
 
LVL 1

Expert Comment

by:mournblade
ID: 2805730
<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
 

Expert Comment

by:rgough
ID: 2805870
.. 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
 
LVL 1

Expert Comment

by:zoushen
ID: 2807787
 

  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
 
LVL 6

Accepted Solution

by:
Talmash earned 50 total points
ID: 2808096
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now