From: Rui Zhao (renyuneyun) Date: Wed, 5 Apr 2017 20:11:13 +0000 (+0100) Subject: script: fix start message showing in output file when -q is on X-Git-Tag: v2.30-rc1~111^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=493548b85d528bb13e72af8240fd997fdbfdd7ea;p=thirdparty%2Futil-linux.git script: fix start message showing in output file when -q is on Signed-off-by: Rui Zhao (renyuneyun) --- diff --git a/term-utils/script.c b/term-utils/script.c index d1ef07203f..a58590188a 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) {