Annotation of src/usr.bin/script/script.1, Revision 1.1.1.1
1.1 deraadt 1: .\" $NetBSD: script.1,v 1.3 1994/12/21 08:55:41 jtc 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 script
44: .Op Fl a
45: .Op Ar file
46: .Sh DESCRIPTION
47: .Nm Script
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 Script
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 script :
99: .Bl -tag -width SHELL
100: .It Ev SHELL
101: If the variable
102: .Ev SHELL
103: exists, the shell forked by
104: .Nm script
105: will be that shell. If
106: .Ev SHELL
107: is not set, the Bourne shell
108: is assumed. (Most shells set this variable automatically).
109: .El
110: .Sh SEE ALSO
111: .Xr csh 1
112: (for the
113: .Em history
114: mechanism).
115: .Sh HISTORY
116: The
117: .Nm script
118: command appeared in
119: .Bx 3.0 .
120: .Sh BUGS
121: .Nm Script
122: places
123: .Sy everything
124: in the log file, including linefeeds and backspaces.
125: This is not what the naive user expects.