I need to make a session of my computer program's output for my programming class. I can't find how to do it in my notes or online. im sure it's simple, but im missing it. The only hint i got was
" Use Unix%26gt;script %26lt;sessionFile%26gt; to do this "
im assuming somewhere you input the "XXX.exe" and the destination file... but i cant seem to get anything to work.
How do i make a session file using a unix command window?
When you start your session at the xterm window, type "script %26lt;filemname%26gt;" at the prompt. That will open a file named %26lt;filename%26gt; that will record your session. If you just type in the command script, it will output to a file named "typescript".
Then you just run your program. When you are done, press CTRL-D.
For example I did the following on my Linux box..
mike@edsel:~%26gt; script sizes_script
Script started, file is sizes_script
mike@edsel:~%26gt; ./sizes
char= 1
unsigned char = 1
int = 4
unsigned int = 4
short = 2
unsigned short = 2
long = 4
unsigned long = 4
float = 4
double = 8
long double = 12
mike@edsel:~%26gt; Script done, file is sizes_script
mike@edsel:~%26gt;
I typed a CRTL-D at the second to last line.
For more info, type "man script" into your xterm. That will give you all the info you need.
Reply:check out this site
http://www.tech-faq.com/capture-unix-ter...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment