]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
script: fix start message showing in output file when -q is on
authorRui Zhao (renyuneyun) <renyuneyun@gmail.com>
Wed, 5 Apr 2017 20:11:13 +0000 (21:11 +0100)
committerRui Zhao (renyuneyun) <renyuneyun@gmail.com>
Wed, 5 Apr 2017 20:11:13 +0000 (21:11 +0100)
Signed-off-by: Rui Zhao (renyuneyun) <renyuneyun@gmail.com>
term-utils/script.c

index d1ef07203f7afa1d0be8878a2d46c1f31fba3e77..a58590188a6d204bd4aa0e3524c61266b50f1c09 100644 (file)
@@ -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) {