xref: /csrg-svn/usr.bin/script/script.1 (revision 62221)
1*62221Sbostic.\" Copyright (c) 1980, 1990, 1993
2*62221Sbostic.\"	The Regents of the University of California.  All rights reserved.
319285Smckusick.\"
450600Scael.\" %sccs.include.redist.roff%
519285Smckusick.\"
6*62221Sbostic.\"	@(#)script.1	8.1 (Berkeley) 06/06/93
744957Scael.\"
844957Scael.Dd
944957Scael.Dt SCRIPT 1
1044957Scael.Os BSD 4
1144957Scael.Sh NAME
1244957Scael.Nm script
1344957Scael.Nd make typescript of terminal session
1444957Scael.Sh SYNOPSIS
1544957Scael.Nm script
1644957Scael.Op Fl a
1744957Scael.Op Ar file
1844957Scael.Sh DESCRIPTION
1944957Scael.Nm Script
2019285Smckusickmakes a typescript of everything printed on your terminal.
2144957ScaelIt is useful for students who need a hardcopy record of an interactive
2244957Scaelsession as proof of an assignment, as the typescript file
2344957Scaelcan be printed out later with
2444957Scael.Xr lpr 1 .
2544957Scael.Pp
2644957ScaelIf the argument
2744957Scael.Ar file
2844957Scaelis given,
2944957Scael.Nm
3044957Scaelsaves all dialogue in
3144957Scael.Ar file .
3244957ScaelIf no file name is given, the typescript is saved in the file
3344957Scael.Pa typescript  .
3444957Scael.Pp
3544957ScaelOption:
3650600Scael.Bl -tag -width Ds
3750600Scael.It Fl a
3844957ScaelAppend the output to
3944957Scael.Ar file
4044957Scaelor
4144957Scael.Pa typescript ,
4244957Scaelretaining the prior contents.
4350600Scael.El
4444957Scael.Pp
4544957ScaelThe script ends when the forked shell exits (a
4644957Scael.Em control-D
4744957Scaelto exit
4844957Scaelthe Bourne shell
4950600Scael.Pf ( Xr sh 1 ) ,
5044957Scaeland
5144957Scael.Em exit ,
5244957Scael.Em logout
5344957Scaelor
5444957Scael.Em control-d
5544957Scael(if
5644957Scael.Em ignoreeof
5744957Scaelis not set) for the
5844957ScaelC-shell,
5944957Scael.Xr csh 1 ) .
6044957Scael.Pp
6144957ScaelCertain interactive commands, such as
6244957Scael.Xr vi 1 ,
6344957Scaelcreate garbage in the typescript file.
6444957Scael.Nm Script
6544957Scaelworks best with commands that do not manipulate the
6644957Scaelscreen, the results are meant to emulate a hardcopy
6744957Scaelterminal.
6844957Scael.Sh ENVIRONMENT
6944957ScaelThe following environment variable is utilized by
7044957Scael.Nm script :
7150600Scael.Bl -tag -width SHELL
7250600Scael.It Ev SHELL
7344957ScaelIf the variable
7444957Scael.Ev SHELL
7544957Scaelexists, the shell forked by
7644957Scael.Nm script
7744957Scaelwill be that shell. If
7844957Scael.Ev SHELL
7944957Scaelis not set, the Bourne shell
8044957Scaelis assumed. (Most shells set this variable automatically).
8150600Scael.El
8244957Scael.Sh SEE ALSO
8344957Scael.Xr csh 1
8444957Scael(for the
8544957Scael.Em history
8644957Scaelmechanism).
8744957Scael.Sh HISTORY
8850600ScaelThe
8950600Scael.Nm script
9050600Scaelcommand appeared in
9150600Scael.Bx 3.0 .
9244957Scael.Sh BUGS
9344957Scael.Nm Script
9444957Scaelplaces
9544957Scael.Sy everything
9644957Scaelin the log file, including linefeeds and backspaces.
9744957ScaelThis is not what the naive user expects.
98