]>
Commit | Line | Data |
---|---|---|
44bd5ea7 A |
1 | .\" $NetBSD: script.1,v 1.4 1997/10/19 22:57:47 lukem Exp $ |
2 | .\" | |
3 | .\" Copyright (c) 1980, 1990, 1993 | |
4 | .\" The Regents of the University of California. All rights reserved. | |
5 | .\" | |
6 | .\" Redistribution and use in source and binary forms, with or without | |
7 | .\" modification, are permitted provided that the following conditions | |
8 | .\" are met: | |
9 | .\" 1. Redistributions of source code must retain the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer. | |
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
12 | .\" notice, this list of conditions and the following disclaimer in the | |
13 | .\" documentation and/or other materials provided with the distribution. | |
14 | .\" 3. All advertising materials mentioning features or use of this software | |
15 | .\" must display the following acknowledgement: | |
16 | .\" This product includes software developed by the University of | |
17 | .\" California, Berkeley and its contributors. | |
18 | .\" 4. Neither the name of the University nor the names of its contributors | |
19 | .\" may be used to endorse or promote products derived from this software | |
20 | .\" without specific prior written permission. | |
21 | .\" | |
22 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
23 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
24 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
25 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
26 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
28 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
29 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
30 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
31 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
32 | .\" SUCH DAMAGE. | |
33 | .\" | |
34 | .\" @(#)script.1 8.1 (Berkeley) 6/6/93 | |
35 | .\" | |
36 | .Dd June 6, 1993 | |
37 | .Dt SCRIPT 1 | |
38 | .Os BSD 4 | |
39 | .Sh NAME | |
40 | .Nm script | |
41 | .Nd make typescript of terminal session | |
42 | .Sh SYNOPSIS | |
43 | .Nm | |
44 | .Op Fl a | |
45 | .Op Ar file | |
46 | .Sh DESCRIPTION | |
47 | .Nm | |
48 | makes a typescript of everything printed on your terminal. | |
49 | It is useful for students who need a hardcopy record of an interactive | |
50 | session as proof of an assignment, as the typescript file | |
51 | can be printed out later with | |
52 | .Xr lpr 1 . | |
53 | .Pp | |
54 | If the argument | |
55 | .Ar file | |
56 | is given, | |
57 | .Nm | |
58 | saves all dialogue in | |
59 | .Ar file . | |
60 | If no file name is given, the typescript is saved in the file | |
61 | .Pa typescript . | |
62 | .Pp | |
63 | Option: | |
64 | .Bl -tag -width Ds | |
65 | .It Fl a | |
66 | Append the output to | |
67 | .Ar file | |
68 | or | |
69 | .Pa typescript , | |
70 | retaining the prior contents. | |
71 | .El | |
72 | .Pp | |
73 | The script ends when the forked shell exits (a | |
74 | .Em control-D | |
75 | to exit | |
76 | the Bourne shell | |
77 | .Pf ( Xr sh 1 ) , | |
78 | and | |
79 | .Em exit , | |
80 | .Em logout | |
81 | or | |
82 | .Em control-d | |
83 | (if | |
84 | .Em ignoreeof | |
85 | is not set) for the | |
86 | C-shell, | |
87 | .Xr csh 1 ) . | |
88 | .Pp | |
89 | Certain interactive commands, such as | |
90 | .Xr vi 1 , | |
91 | create garbage in the typescript file. | |
92 | .Nm | |
93 | works best with commands that do not manipulate the | |
94 | screen, the results are meant to emulate a hardcopy | |
95 | terminal. | |
96 | .Sh ENVIRONMENT | |
97 | The following environment variable is utilized by | |
98 | .Nm | |
99 | : | |
100 | .Bl -tag -width SHELL | |
101 | .It Ev SHELL | |
102 | If the variable | |
103 | .Ev SHELL | |
104 | exists, the shell forked by | |
105 | .Nm | |
106 | will be that shell. If | |
107 | .Ev SHELL | |
108 | is not set, the Bourne shell | |
109 | is assumed. (Most shells set this variable automatically). | |
110 | .El | |
111 | .Sh SEE ALSO | |
112 | .Xr csh 1 | |
113 | (for the | |
114 | .Em history | |
115 | mechanism). | |
116 | .Sh HISTORY | |
117 | The | |
118 | .Nm | |
119 | command appeared in | |
120 | .Bx 3.0 . | |
121 | .Sh BUGS | |
122 | .Nm | |
123 | places | |
124 | .Sy everything | |
125 | in the log file, including linefeeds and backspaces. | |
126 | This is not what the naive user expects. |