Listing of script.c

B. Banerjee bbanerje at sjuvax.UUCP
Tue Nov 15 08:54:05 AEST 1983


Here is the manual page for script .  Again, I hope that I am
not violating anyones copyright.

---------------------------------------------------------------
.TH SCRIPT 1
.UC 4
.SH NAME
script \- make typescript of terminal session
.SH SYNOPSIS
.B script
[
.B \-a
] [
.B \-q
] [
.B \-S
shell
] [ file ]
.SH DESCRIPTION
.I Script
makes a typescript of everything printed on your terminal.
The typescript is saved in a file, and can be sent to the
line printer later with
.I lpr.
If a file name is given, the typescript
is saved there.  If not, the typescript is saved in the file
.I typescript.
.PP
To exit script, type control D.  This sends an end of file to
all processes you have started up, and causes script to exit.
For this reason, control D behaves as though you had typed an
infinite number of control D's.
.PP
This program is useful when using a crt and a hard-copy
record of the dialog is desired, as for a student handing
in a program that was developed on a crt when hard-copy
terminals are in short supply.
.PP
.B \-S
lets you specify the shell to use.
The default depends on the system:
If the variable SHELL is set in the environment, it is used if possible.
.PP
The
.B \-q
flag asks for ``quiet mode'', where the ``script started''
and ``script done'' messages are turned off.
The
.B \-a
flag causes script to append to the typescript file
instead of creating a new file.
.SH AUTHOR
Mark Horton
.SH BUGS
Since UNIX has no way to write an end-of-file down a pipe without closing
the pipe, there is no way to simulate a single control D without
ending script.
.PP
The new shell has its standard input coming
from a pipe rather than a tty, so stty will not work, and neither
will ttyname.
In particular, this means that screen editors such as
.IR vi (1)
and the job control facilities of
.IR csh (1)
are inoperative.
.PP
When the user interrupts a printing process,
.I script
attempts to flush the output backed up in the pipe for better response.
Usually the next prompt also gets flushed.
--------------------------------------------------------------
If you don't have this line, you're probably missing something.



More information about the Comp.sources.unix mailing list