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