BSD 4_1_snap development
[unix-history] / usr / man / man1 / script.1
CommitLineData
e3758c96
C
1.TH SCRIPT 1
2.UC 4
3.SH NAME
4script \- make typescript of terminal session
5.SH SYNOPSIS
6.B script
7[
8.B \-a
9] [
10.B \-q
11] [
12.B \-S
13shell
14] [ file ]
15.SH DESCRIPTION
16.I Script
17makes a typescript of everything printed on your terminal.
18The typescript is saved in a file, and can be sent to the
19line printer later with
20.I lpr.
21If a file name is given, the typescript
22is saved there. If not, the typescript is saved in the file
23.I typescript.
24.PP
25To exit script, type control D. This sends an end of file to
26all processes you have started up, and causes script to exit.
27For this reason, control D behaves as though you had typed an
28infinite number of control D's.
29.PP
30This program is useful when using a crt and a hard-copy
31record of the dialog is desired, as for a student handing
32in a program that was developed on a crt when hard-copy
33terminals are in short supply.
34.PP
35.B \-S
36lets you specify the shell to use.
37The default depends on the system:
38If the variable SHELL is set in the environment, it is used if possible.
39.PP
40The
41.B \-q
42flag asks for ``quiet mode'', where the ``script started''
43and ``script done'' messages are turned off.
44The
45.B \-a
46flag causes script to append to the typescript file
47instead of creating a new file.
48.SH AUTHOR
49Mark Horton
50.SH BUGS
51Since UNIX has no way to write an end-of-file down a pipe without closing
52the pipe, there is no way to simulate a single control D without
53ending script.
54.PP
55The new shell has its standard input coming
56from a pipe rather than a tty, so stty will not work, and neither
57will ttyname.
58In particular, this means that screen editors such as
59.IR vi (1)
60and the job control facilities of
61.IR csh (1)
62are inoperative.
63.PP
64When the user interrupts a printing process,
65.I script
66attempts to flush the output backed up in the pipe for better response.
67Usually the next prompt also gets flushed.