Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ script(1) — GDT-UNX 6.8_er0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SCRIPT(1)  —  UNIX Programmer’s Manual

NAME

script − make typescript of terminal session

SYNOPSIS

script [ −a ] [ −n ] [ −q ] [ −s ] [ −S shell ] [ file ]

DESCRIPTION

Script makes a typescript of output printed on your terminal.  The typescript is saved in a file, and can be sent later to the line printer with lpr.  If a file name is given, the typescript is saved there;  if not, the typescript is saved in the file typescript. 

To exit script, type control D.  This sends an end of file to all processes you have started up, and causes script to exit.  Control D behaves as though you had typed an infinite number of control D’s. 

This program is useful when using a crt and a hard-copy record of the dialog is desired.  (i.e., as for a student handing in a program developed on a crt when hard-copy terminals are in short supply.) 

−S allows you to specify the shell to use.  The −s option creates a standard shell, and the −n option forms a new shell.  The default depends on the system: if the variable SHELL is set in the environment, it is used, if possible. 

The −q flag asks for “quiet mode”, in which the “script started” and “script done” messages are turned off.  The −a flag causes script to append to the typescript file, instead of creating a new file. 

AUTHOR

Mark Horton

BUGS

As UNIX has no way to write an end-of-file down a pipe without closing the pipe, there is method to simulate a single control D without ending script. 

The new shell has its standard input coming from a pipe rather than a tty, therefore, stty and ttyname do not work.  In particular, this means that screen editors such as vi(1) and the job control facilities of csh(1) are inoperative.

When the user interrupts a printing process, script attempts to flush the output backed up in the pipe for better response.  Usually, the next prompt also gets flushed. 

4th Berkeley Distribution  —  %W%%Q%%Y%

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026