aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/script/script.1
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1998-03-08 14:19:18 +0000
committerPeter Wemm <peter@FreeBSD.org>1998-03-08 14:19:18 +0000
commite8eb82a81cc4c0aa5731030989a8647bdc655cc0 (patch)
tree9eaeec1c55c11f989b00f48094ff278a83204b95 /usr.bin/script/script.1
parenta2034fc036957d64aa4110d1fb4ee3faa29edf5d (diff)
downloadsrc-e8eb82a81cc4c0aa5731030989a8647bdc655cc0.tar.gz
src-e8eb82a81cc4c0aa5731030989a8647bdc655cc0.zip
Rewrite script as a select loop rather than as a twin reader/write process.
This allows simple logging of keys sent to a session (turned on with -k). Also allow specifying the script file flush interval.
Notes
Notes: svn path=/head/; revision=34295
Diffstat (limited to 'usr.bin/script/script.1')
-rw-r--r--usr.bin/script/script.121
1 files changed, 18 insertions, 3 deletions
diff --git a/usr.bin/script/script.1 b/usr.bin/script/script.1
index 6c0f7d697ea7..4acda57273a6 100644
--- a/usr.bin/script/script.1
+++ b/usr.bin/script/script.1
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)script.1 8.1 (Berkeley) 6/6/93
-.\" $Id$
+.\" $Id: script.1,v 1.3 1997/12/29 13:31:46 peter Exp $
.\"
.Dd June 6, 1993
.Dt SCRIPT 1
@@ -41,7 +41,9 @@
.Sh SYNOPSIS
.Nm
.Op Fl a
+.Op Fl k
.Op Fl q
+.Op Fl t Ar time
.Op Ar file
.Op Ar command ...
.Sh DESCRIPTION
@@ -68,16 +70,23 @@ is given,
will run the specified command with an optional argument vector
instead of an interactive shell.
.Pp
-Option:
-.Bl -tag -width Ds
+Options:
+.Bl -tag -width xxxxxxx
.It Fl a
Append the output to
.Ar file
or
.Pa typescript ,
retaining the prior contents.
+.It Fl k
+Log keys sent to program as well as output.
.It Fl q
Run in quiet mode, omit the start and stop status messages.
+.It Fl t Ar time
+Specify time interval between flushing script output file. A value of 0
+causes
+.Nm
+to flush for every character I/O event.
.El
.Pp
The script ends when the forked shell (or command) exits (a
@@ -136,3 +145,9 @@ This is not what the naive user expects.
.Pp
It is not possible to specify a command without also naming the script file
because of argument parsing compatability issues.
+.Pp
+When running in
+.Fl k
+mode, echo cancelling far from ideal. The slave terminal mode is checked
+for ECHO mode to check when to avoid manual echo logging. This does not
+work when in a raw mode where the program being run is doing manual echo.