diff options
author | Rui Zhao (renyuneyun) | 2017-04-05 22:11:13 +0200 |
---|---|---|
committer | Rui Zhao (renyuneyun) | 2017-04-05 22:11:13 +0200 |
commit | 493548b85d528bb13e72af8240fd997fdbfdd7ea (patch) | |
tree | d174571f0e70100437c994f756449dd4e3858472 /term-utils/script.c | |
parent | docs: update Documentation/deprecated.txt (diff) | |
download | kernel-qcow2-util-linux-493548b85d528bb13e72af8240fd997fdbfdd7ea.tar.gz kernel-qcow2-util-linux-493548b85d528bb13e72af8240fd997fdbfdd7ea.tar.xz kernel-qcow2-util-linux-493548b85d528bb13e72af8240fd997fdbfdd7ea.zip |
script: fix start message showing in output file when -q is on
Signed-off-by: Rui Zhao (renyuneyun) <renyuneyun@gmail.com>
Diffstat (limited to 'term-utils/script.c')
-rw-r--r-- | term-utils/script.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/term-utils/script.c b/term-utils/script.c index d1ef07203..a58590188 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -435,7 +435,8 @@ static void do_io(struct script_control *ctl) strftime(buf, sizeof buf, "%c\n", localtime(&tvec)); - fprintf(ctl->typescriptfp, _("Script started on %s"), buf); + if (!ctl->quiet && ctl->typescriptfp) + fprintf(ctl->typescriptfp, _("Script started on %s"), buf); gettime_monotonic(&ctl->oldtime); while (!ctl->die) { |