|
|
1.1 ! root 1: .\" Copyright (c) 1980, 1990 Regents of the University of California. ! 2: .\" All rights reserved. ! 3: .\" ! 4: .\" Redistribution and use in source and binary forms are permitted provided ! 5: .\" that: (1) source distributions retain this entire copyright notice and ! 6: .\" comment, and (2) distributions including binaries display the following ! 7: .\" acknowledgement: ``This product includes software developed by the ! 8: .\" University of California, Berkeley and its contributors'' in the ! 9: .\" documentation or other materials provided with the distribution and in ! 10: .\" all advertising materials mentioning features or use of this software. ! 11: .\" Neither the name of the University nor the names of its contributors may ! 12: .\" be used to endorse or promote products derived from this software without ! 13: .\" specific prior written permission. ! 14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ! 15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ! 16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 17: .\" ! 18: .\" @(#)script.1 6.3 (Berkeley) 7/24/90 ! 19: .\" ! 20: .Dd July 24, 1990 ! 21: .Dt SCRIPT 1 ! 22: .Os BSD 4 ! 23: .Sh NAME ! 24: .Nm script ! 25: .Nd make typescript of terminal session ! 26: .Sh SYNOPSIS ! 27: .Nm script ! 28: .Op Fl a ! 29: .Op Ar file ! 30: .Sh DESCRIPTION ! 31: .Nm Script ! 32: makes a typescript of everything printed on your terminal. ! 33: It is useful for students who need a hardcopy record of an interactive ! 34: session as proof of an assignment, as the typescript file ! 35: can be printed out later with ! 36: .Xr lpr 1 . ! 37: .Pp ! 38: If the argument ! 39: .Ar file ! 40: is given, ! 41: .Nm ! 42: saves all dialogue in ! 43: .Ar file . ! 44: If no file name is given, the typescript is saved in the file ! 45: .Pa typescript . ! 46: .Pp ! 47: Option: ! 48: .Tw Ds ! 49: .Tp Fl a ! 50: Append the output to ! 51: .Ar file ! 52: or ! 53: .Pa typescript , ! 54: retaining the prior contents. ! 55: .Tp ! 56: .Pp ! 57: The script ends when the forked shell exits (a ! 58: .Em control-D ! 59: to exit ! 60: the Bourne shell ! 61: .Pf \&( Xr sh 1 ) , ! 62: and ! 63: .Em exit , ! 64: .Em logout ! 65: or ! 66: .Em control-d ! 67: (if ! 68: .Em ignoreeof ! 69: is not set) for the ! 70: C-shell, ! 71: .Xr csh 1 ) . ! 72: .Pp ! 73: Certain interactive commands, such as ! 74: .Xr vi 1 , ! 75: create garbage in the typescript file. ! 76: .Nm Script ! 77: works best with commands that do not manipulate the ! 78: screen, the results are meant to emulate a hardcopy ! 79: terminal. ! 80: .Sh ENVIRONMENT ! 81: The following environment variable is utilized by ! 82: .Nm script : ! 83: .Tw SHELL ! 84: .Tp Ev SHELL ! 85: If the variable ! 86: .Ev SHELL ! 87: exists, the shell forked by ! 88: .Nm script ! 89: will be that shell. If ! 90: .Ev SHELL ! 91: is not set, the Bourne shell ! 92: is assumed. (Most shells set this variable automatically). ! 93: .Tp ! 94: .Sh SEE ALSO ! 95: .Xr csh 1 ! 96: (for the ! 97: .Em history ! 98: mechanism). ! 99: .Sh HISTORY ! 100: .Nm Script ! 101: appeared in 3 BSD. ! 102: .Sh BUGS ! 103: .Nm Script ! 104: places ! 105: .Sy everything ! 106: in the log file, including linefeeds and backspaces. ! 107: This is not what the naive user expects.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.