Solved

Easy one...

Posted on 2000-05-12
4
189 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
Comment Utility
<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
Comment Utility
.. 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
Comment Utility
 

  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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

763 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

13 Experts available now in Live!

Get 1:1 Help Now