version 1.14, 2012/01/15 20:06:40 |
version 1.15, 2018/01/21 20:18:20 |
|
|
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm script |
.Nm script |
.Op Fl a |
.Op Fl a |
|
.Op Fl c Ar command |
.Op Ar file |
.Op Ar file |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
.Nm |
.Nm |
|
|
or |
or |
.Pa typescript , |
.Pa typescript , |
retaining the prior contents. |
retaining the prior contents. |
|
.It Fl c Ar command |
|
Run |
|
.Ar command |
|
instead of an interactive shell. |
|
To run a command with arguments, enclose both in quotes. |
.El |
.El |
.Pp |
.Pp |
The script ends when the forked shell exits (a control-D |
The script ends when the forked program exits (a control-D |
.Pq Ql ^D |
.Pq Ql ^D |
to exit |
to exit |
the Bourne shell |
the Bourne shell |
|
|
If not set, the Bourne shell is assumed. |
If not set, the Bourne shell is assumed. |
(Most shells set this variable automatically.) |
(Most shells set this variable automatically.) |
.El |
.El |
|
.Sh EXAMPLES |
|
Start a virtual machine and log all console output to a file: |
|
.Bd -literal -offset indent |
|
$ script -c "vmctl start myvm -c" myvm.typescript |
|
.Ed |
.Sh HISTORY |
.Sh HISTORY |
A predecessor called |
A predecessor called |
.Nm dribble |
.Nm dribble |