Commit | Line | Data |
---|---|---|
daacd5f0 | 1 | .\" Copyright (c) 1980, 1990 Regents of the University of California. |
5325ced3 | 2 | .\" All rights reserved. |
e51e7121 | 3 | .\" |
5325ced3 | 4 | .\" %sccs.include.redist.man% |
e51e7121 | 5 | .\" |
d0719240 | 6 | .\" @(#)script.1 6.4 (Berkeley) %G% |
5325ced3 | 7 | .\" |
ee9b0a0a CL |
8 | .Vx |
9 | .Vx | |
5325ced3 CL |
10 | .Dd |
11 | .Dt SCRIPT 1 | |
12 | .Os BSD 4 | |
13 | .Sh NAME | |
14 | .Nm script | |
15 | .Nd make typescript of terminal session | |
16 | .Sh SYNOPSIS | |
17 | .Nm script | |
18 | .Op Fl a | |
19 | .Op Ar file | |
20 | .Sh DESCRIPTION | |
21 | .Nm Script | |
e51e7121 | 22 | makes a typescript of everything printed on your terminal. |
5325ced3 CL |
23 | It is useful for students who need a hardcopy record of an interactive |
24 | session as proof of an assignment, as the typescript file | |
25 | can be printed out later with | |
26 | .Xr lpr 1 . | |
27 | .Pp | |
28 | If the argument | |
29 | .Ar file | |
30 | is given, | |
31 | .Nm | |
32 | saves all dialogue in | |
33 | .Ar file . | |
34 | If no file name is given, the typescript is saved in the file | |
35 | .Pa typescript . | |
36 | .Pp | |
37 | Option: | |
38 | .Tw Ds | |
39 | .Tp Fl a | |
40 | Append the output to | |
41 | .Ar file | |
42 | or | |
43 | .Pa typescript , | |
44 | retaining the prior contents. | |
45 | .Tp | |
46 | .Pp | |
47 | The script ends when the forked shell exits (a | |
48 | .Em control-D | |
49 | to exit | |
50 | the Bourne shell | |
51 | .Pf \&( Xr sh 1 ) , | |
52 | and | |
53 | .Em exit , | |
54 | .Em logout | |
55 | or | |
56 | .Em control-d | |
57 | (if | |
58 | .Em ignoreeof | |
59 | is not set) for the | |
60 | C-shell, | |
61 | .Xr csh 1 ) . | |
62 | .Pp | |
63 | Certain interactive commands, such as | |
64 | .Xr vi 1 , | |
65 | create garbage in the typescript file. | |
66 | .Nm Script | |
67 | works best with commands that do not manipulate the | |
68 | screen, the results are meant to emulate a hardcopy | |
69 | terminal. | |
70 | .Sh ENVIRONMENT | |
71 | The following environment variable is utilized by | |
72 | .Nm script : | |
73 | .Tw SHELL | |
74 | .Tp Ev SHELL | |
75 | If the variable | |
76 | .Ev SHELL | |
77 | exists, the shell forked by | |
78 | .Nm script | |
79 | will be that shell. If | |
80 | .Ev SHELL | |
81 | is not set, the Bourne shell | |
82 | is assumed. (Most shells set this variable automatically). | |
83 | .Tp | |
84 | .Sh SEE ALSO | |
85 | .Xr csh 1 | |
86 | (for the | |
87 | .Em history | |
88 | mechanism). | |
89 | .Sh HISTORY | |
90 | .Nm Script | |
91 | appeared in 3 BSD. | |
92 | .Sh BUGS | |
93 | .Nm Script | |
94 | places | |
95 | .Sy everything | |
96 | in the log file, including linefeeds and backspaces. | |
97 | This is not what the naive user expects. |