is there an equivalent of unix's "script" for dos?

stndn

Golden Member
Mar 10, 2001
1,886
0
0
in unix, there's a program called "script", which you can use to record all the commands and outputs (as well as input) that's going on from when you executed it until you typed exit.... the "record" is like a running screenshot, which you can then open in any text editor and print it out..

right now i'm looking for the same (or similar) program for use in dos (window's command prompt). does such thing exist? i know i can copy/paste from my command window to notepad or something, but then it's not fun when my homework gives out 4-5 pages of output and i need to copy/paste them for printing .....

so ... anyone knows of such software?

thanks :)
-1052-
 

y00ycdz

Golden Member
Jan 5, 2001
1,313
0
76
i know when your doing a dir listing and u want it to go to a file u can do

dir /s > c:\dir.txt

the > makes everything in directory (+subdirs) listing go to a text file, but i'm not sure if u can do that with programs, like "whatever.exe > c:\whatever.txt" you could try it....

:D
-y00yCDz
 

stndn

Golden Member
Mar 10, 2001
1,886
0
0
well, i'd try that, but then again i'll get into troubles when my program is asking for input, since i won't be able to type in my input correctly, or the outcome won't be the same as using "script" ...

thank you, though :)
-1054-
 

singh

Golden Member
Jul 5, 2001
1,449
0
0
There are tens of programs out there that do what you ask. As a matter of fact, one of my assignments in Assembly Programming was to make this program:)

Here's a link to one: Tcap

If you want to find more, try the Simtel.net MS-DOS archives.
 

stndn

Golden Member
Mar 10, 2001
1,886
0
0
thank you :)
i downloaded and tried the software..
according to the readme file, it's supposed to capture all stdin/stdout/stderr
but when i run it, it only captures the commands that i typed in the command prompt and none of the output (from a perl script). and also doing something like "type filename.txt", which should give me the contents of file, does nothing for me as well ....

maybe i need to play with it some more, or maybe it's incompatible with win2k's cmd.exe?

in either case, thank you -)

-1056-
 

bunker

Lifer
Apr 23, 2001
10,572
0
71
You do realize that in the time you're taking to try and figure out a shortcut for doing your homework you could probably have been done already ;)
 

stndn

Golden Member
Mar 10, 2001
1,886
0
0
well ... i'm actually done with my current homework. ... :)
but it's for the next and next and next (etc) homeworks, since we're required to take a "snapshot" of our program run and turn in the output ....

usually i end up copy/paste the output from my cmd.exe box...
other times i ftp the script to our school's unix machine, run it there, and ftp the result back

but well, it would be good if i can get that thing, since life would be much easier (esp when the output is very long) :)

-1057-

edit: and oh, btw, this program i'm looking for is not as a solution to my homework, but it's for helping me capture the output of my homeworks in easier way ... -)
it's singh who has an assignment to make this thing in (gasp! the horror!!) assembly language ...