version 1 showing authors affecting page license.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
---- |
|
|
2 |
__NAME__ |
|
|
3 |
|
|
|
4 |
|
|
|
5 |
script - make typescript of terminal session |
|
|
6 |
__SYNOPSIS__ |
|
|
7 |
|
|
|
8 |
|
|
|
9 |
script [[-a] [[-f] [[-q] [[-t] [[file] |
|
|
10 |
__DESCRIPTION__ |
|
|
11 |
|
|
|
12 |
|
|
|
13 |
Script makes a typescript of everything printed on your ter- |
|
|
14 |
minal. It is useful for students who need a hardcopy record |
|
|
15 |
of an interactive session as proof of an assignment, as the |
|
|
16 |
typescript file can be printed out later with |
|
|
17 |
lpr(1). |
|
|
18 |
|
|
|
19 |
|
|
|
20 |
If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript. |
|
|
21 |
|
|
|
22 |
|
|
|
23 |
Options: |
|
|
24 |
-a Append the output to file or typescript |
|
|
25 |
, retaining the prior contents. |
|
|
26 |
|
|
|
27 |
|
|
|
28 |
-f |
|
|
29 |
Flush output after each write. This is nice for tele- cooperation: One person does `mkfifo foo; script -f foo' and another can supervise real-time what is being done using `cat foo'. |
|
|
30 |
|
|
|
31 |
|
|
|
32 |
-q |
|
|
33 |
Be quiet. |
|
|
34 |
|
|
|
35 |
|
|
|
36 |
-t |
|
|
37 |
Output timeing data to standard error. This data con- tains |
|
|
38 |
two fields, separated by a space. The first field indicates |
|
|
39 |
how much time elapsed since the pre- vious output. The |
|
|
40 |
second field indicates how many characters were output this |
|
|
41 |
time. This information can be used to replay typescripts |
|
|
42 |
with realistic typ- ing and output delays. |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
The script ends when the forked shell exits (a |
|
|
46 |
''control-D'' to exit the Bourne shell (sh(1)), |
|
|
47 |
and ''exit'', ''logout'' or ''control-d'' (if |
|
|
48 |
''ignoreeof'' is not set) for the C-shell, |
|
|
49 |
csh(1)). |
|
|
50 |
|
|
|
51 |
|
|
|
52 |
Certain interactive commands, such as vi(1), create |
|
|
53 |
garbage in the typescript file. Script works best with |
|
|
54 |
commands that do not manipulate the screen, the results are |
|
|
55 |
meant to emulate a hardcopy terminal. |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
__ENVIRONMENT__ |
|
|
59 |
|
|
|
60 |
|
|
|
61 |
The following environment variable is utilized by |
|
|
62 |
script: |
|
|
63 |
SHELL |
|
|
64 |
|
|
|
65 |
|
|
|
66 |
If the variable SHELL exists, the shell forked by |
|
|
67 |
script will be that shell. If SHELL is not set, the |
|
|
68 |
Bourne shell is assumed. (Most shells set this vari- able |
|
|
69 |
automatically). |
|
|
70 |
|
|
|
71 |
|
|
|
72 |
__SEE ALSO__ |
|
|
73 |
|
|
|
74 |
|
|
|
75 |
csh(1) (for the ''history'' |
|
|
76 |
mechanism). |
|
|
77 |
__HISTORY__ |
|
|
78 |
|
|
|
79 |
|
|
|
80 |
The script command appeared in 3.0 BSD |
|
|
81 |
. |
|
|
82 |
__BUGS__ |
|
|
83 |
|
|
|
84 |
|
|
|
85 |
Script places __everything__ in the log file, including |
|
|
86 |
line- feeds and backspaces. This is not what the naive user |
|
|
87 |
expects. |
|
|
88 |
|
|
|
89 |
|
|
|
90 |
Linux July 30, 2000 1 |
|
|
91 |
---- |