How to Use the UNIX "script" Program

(Click on "UNIX" above to go to the CSE Unix help pages.)

Last Update: 22 January 2004

Note: NEW or UPDATED material is highlighted


To make a transcript of an interaction on UNIX, do the following:

  1. Type:

    You will see the message:

  2. You are now in the "script" program, but it will look as if nothing else has happened. In particular, you will see your UNIX prompt.

  3. At that prompt, enter whatever it is you wish to have a transcript of.

    E.g., to get a transcript of a SNePS interaction, you would need to invoke ACL Common Lisp, then invoke SNePS, then have some kind of interaction with SNePS, then exit SNePS, then exit Lisp. Simply type all the appropriate commands as if you were talking directly to UNIX:

  4. You have now finished your interaction and are back at the UNIX prompt within the "script" program. Now you need to exit from "script". To do that, type "exit" at the prompt, and your real UNIX prompt will be returned to you:

  5. You are now back talking directly to UNIX. The next thing you need to do is print your transcript. However, you must first edit out all control characters from the file FILENAME. To do that, enter your favorite text editor with the file FILENAME, delete all control characters (normally, these will be a few occurrences of "^H", "^G", and lots of "^M").

  6. Finally, send your file to the printer, using your favorite print command.

Copyright © 2003-2004 by William J. Rapaport (
file: script.2004.01.22.html