[BACK]Return to script.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / script

Annotation of src/usr.bin/script/script.1, Revision 1.8

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