script command The script command makes a transcript of the text that is printed to the terminal. You can record your interaction with the shell using this command. It will send it to a file that you name or if you do not add a filename it will send it to the default file called "typescript".
-a append to previous script
Stop the script with CTRL+D or logout of the shell.
script [-a] [-c COMMAND] [-f] [-q] [-t] [file]
Example of script: Here the command will start and record to a file called "record". If you want to use this file over and over and keep appending to the contents use the "-a" option.
script record ####################################################### Script started on Thu 09 Jul 2009 02:35:44 AM MDT
Script done on Thu 09 Jul 2009 02:35:59 AM MDT ######################################################
You can see several commands have been used and that there is a "^M" to indicated the end of a line. The script is ended in the example by using CTRL+D. Note the start and end times are recorded.
Copyright CyberMontana Inc. and BeginLinux.com
All rights reserved. Cannot be reproduced without written permission. Box 1262 Trout Creek, MT 59874