Louie Crew's Tricks:unix:Capturing a Session in a File

Capturing a session in a File


           script now

The command above, entered at the pegasus> prompt, will save everything 
else that passes your screen in that session and put it all in a file 
called 'now' (or any other name you give the file).

Then you can treat the log file as you would any other file.  

Since 'script' captures all, it is important to start this process only when
you are about to do work most of which you want to keep.  It is important to 
end the session as soon as you have all you want, even if to come right back
on to download the new file of it all.

Example 1:

Suppose you are using  info, the online help command, and go to the faculty
directory to get addresses and phone numbers for numerous people.  Start the
'script' command just before you enter 'info'; then gather all your data;
then log out.  Log in again, transfer the data to your hard disk, and
manipulate it in any way you want with your word-processor.  That, for
example, is how I create data files on all students in my classes; this
allows me to have labels to send notes immediately to absentees, phone lists
to call people about assignments missed.....

I could get some of this information from other sources, but never so
quickly.  And this time I don't have to key the data in, only trap it.

Example 2:

Just before I go into hytelnet or iris or rlin..... I sometimes 'script' to
capture it all to andromeda, especially if I am gathering data to share
via e-mail with other persons.  Once done, I edit the material with vi,
'insert' the file in mm, and then download it to my own computer, 
if I really need to.  

More and more I find that I manage all this on andromeda and avoid the 
transfer time to my own computer.

If you want to have it more directly to your own computer, your 
communications software will have CApture commands that let you do so.  
It will also have screen dump commands to let you dump one screen at a 
time.  I find dumps particularly useful to save only the data I want when 
reviewing massive catches on Iris.

Enjoy.


Send mail to: lcrew@andromeda.rutgers.edu