[comp.sys.ibm.pc] "script" for MS-DOS?

indermau@dg (Kurt Indermaur) (02/09/88)

I am looking for a utility that behaves like the UNIX "script" command 
(i.e., something that will write everything -- text only, really -- that goes
to the screen to a file).  Does anyone know of such a program?  

Thanks for any help,

Kurt 

tr@wind.bellcore.com (tom reingold) (02/11/88)

In article <3865@umn-cs.cs.umn.edu> indermau@dg.cs.umn.edu.UUCP (Kurt Indermaur) writes:
$ I am looking for a utility that behaves like the UNIX "script" command 
$ (i.e., something that will write everything -- text only, really -- that goes
$ to the screen to a file).  Does anyone know of such a program?  
$ 
$ Thanks for any help,
$ 
$ Kurt 

I have a suggestion that may work for you.

Invoke another copy of command.com and redirect its output to a
file.  You won't be able to see what you are typing and you won't
see your programs output either.  This may be a prohibitive
disadvantage.  But try it.  When you are done and you know that you
are at the DOS prompt, type "exit" or press Ctrl-Z.  Then press
return.

COMMAND > output.dat
stuff
stuff
^Z

type output.dat




Tom Reingold                    INTERNET:       tr@bellcore.bellcore.com
Bell Communications Research    UUCP:           rutgers!bellcore!tr
435 South St room 2L350         SOUNDNET:       (201) 829-4622 [work]
Morristown, NJ 07960                            (201) 287-2345 [home]

graham@sce.UUCP (Doug Graham) (02/20/88)

In article <3865@umn-cs.cs.umn.edu>, indermau@dg (Kurt Indermaur) writes:
> I am looking for a utility that behaves like the UNIX "script" command 
> (i.e., something that will write everything -- text only, really -- that goes
> to the screen to a file).  Does anyone know of such a program?  

   A while back, I wrote such an animal. It bothered me that when running a
long compile, I could either let the compiler diagnostics go to the
screen, and then have to write down where all the errors were so
I could go into an editor and fix them, or I could direct the compiler
output into a file and then sit wondering what was happening while the
compiler crunched away.

   My script command works by chaining to int 21, and then examining each
DOS function call to see if the call would result in output going to the
console. If it would, this output is copied to an internal buffer and
eventually flushed to disk. Of course, this method does not work if
the running program does output either by calling the BIOS, or writing
to the hardware directly, but this has not been a problem for the
type of programs that I use it with.

   I can post the Turbo C source if there is any interest.

Doug.