]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
script: --quiet option is not quiet.
authorJames Hunt <james.hunt@ubuntu.com>
Sat, 21 Jun 2014 23:03:04 +0000 (01:03 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 23 Jun 2014 09:31:07 +0000 (11:31 +0200)
Specifying 'script --quiet ...' still produces the 'Script started'
message in the typescript file. The --quiet option implies that the
script program should not log any of its output to the typescript file.

Originally reported at:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693966

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
term-utils/script.1
term-utils/script.c

index 60a0e53a0e83912276cc23132550aff8d251a4d6..67e1066880ac5918b959f16c5f9e3eb3ab90a9b0 100644 (file)
@@ -82,7 +82,8 @@ Allow the default output destination, i.e. the typescript file, to be a hard
 or symbolic link.  The command will follow a symbolic link.
 .TP
 \fB\-q\fR, \fB\-\-quiet\fR
-Be quiet.
+Be quiet (do not write start and done messages to either standard output
+or the typescript file).
 .TP
 \fB\-t\fR, \fB\-\-timing\fR[=\fIfile\fR]
 Output timing data to standard error, or to
index 1530e6726e391129cb624e73e7b7d3d1507c1fbf..21fb5af9ec86d2e275733e65a492f4ccf0bff585 100644 (file)
@@ -437,7 +437,8 @@ dooutput(void) {
 
        tvec = time((time_t *)NULL);
        my_strftime(obuf, sizeof obuf, "%c\n", localtime(&tvec));
-       fprintf(fscript, _("Script started on %s"), obuf);
+       if (!qflg)
+               fprintf(fscript, _("Script started on %s"), obuf);
 
        FD_ZERO(&readfds);