]> git.saurik.com Git - apple/shell_cmds.git/blame - script/script.1
shell_cmds-74.1.tar.gz
[apple/shell_cmds.git] / script / script.1
CommitLineData
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
48makes a typescript of everything printed on your terminal.
49It is useful for students who need a hardcopy record of an interactive
50session as proof of an assignment, as the typescript file
51can be printed out later with
52.Xr lpr 1 .
53.Pp
54If the argument
55.Ar file
56is given,
57.Nm
58saves all dialogue in
59.Ar file .
60If no file name is given, the typescript is saved in the file
61.Pa typescript .
62.Pp
63Option:
64.Bl -tag -width Ds
65.It Fl a
66Append the output to
67.Ar file
68or
69.Pa typescript ,
70retaining the prior contents.
71.El
72.Pp
73The script ends when the forked shell exits (a
74.Em control-D
75to exit
76the Bourne shell
77.Pf ( Xr sh 1 ) ,
78and
79.Em exit ,
80.Em logout
81or
82.Em control-d
83(if
84.Em ignoreeof
85is not set) for the
86C-shell,
87.Xr csh 1 ) .
88.Pp
89Certain interactive commands, such as
90.Xr vi 1 ,
91create garbage in the typescript file.
92.Nm
93works best with commands that do not manipulate the
94screen, the results are meant to emulate a hardcopy
95terminal.
96.Sh ENVIRONMENT
97The following environment variable is utilized by
98.Nm
99:
100.Bl -tag -width SHELL
101.It Ev SHELL
102If the variable
103.Ev SHELL
104exists, the shell forked by
105.Nm
106will be that shell. If
107.Ev SHELL
108is not set, the Bourne shell
109is assumed. (Most shells set this variable automatically).
110.El
111.Sh SEE ALSO
112.Xr csh 1
113(for the
114.Em history
115mechanism).
116.Sh HISTORY
117The
118.Nm
119command appeared in
120.Bx 3.0 .
121.Sh BUGS
122.Nm
123places
124.Sy everything
125in the log file, including linefeeds and backspaces.
126This is not what the naive user expects.