aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2022-03-10 17:42:55 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2022-03-10 17:42:55 +0000
commit31fde973577d0e09caccf0d762135bfa6b14f1f3 (patch)
tree5120bd15dae938b3b4a31ae46485425e4013ae8d /usr.bin
parentb163dcab27862f90e0108a73185945456cafd2f3 (diff)
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/script/script.14
-rw-r--r--usr.bin/script/script.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/script/script.1 b/usr.bin/script/script.1
index e6c422b476f5..36523148fa90 100644
--- a/usr.bin/script/script.1
+++ b/usr.bin/script/script.1
@@ -131,8 +131,10 @@ If
does not contain any
.Ql %
characters, it indicates the default format:
-.Ql %n@ %s [%Y-%m-%d %T]\ ,
+.Ql %n@ %s [%Y-%m-%d %T]%n ,
which is useful for both tools and humans to read, should be used.
+Note that time-stamps will only be output when different from the
+previous one.
.El
.Pp
The script ends when the forked shell (or command) exits (a
diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c
index e469b13fc65b..430f48ad63df 100644
--- a/usr.bin/script/script.c
+++ b/usr.bin/script/script.c
@@ -91,7 +91,7 @@ static struct termios tt;
#ifndef TSTAMP_FMT
/* useful for tool and human reading */
-# define TSTAMP_FMT "%n@ %s [%Y-%m-%d %T] "
+# define TSTAMP_FMT "%n@ %s [%Y-%m-%d %T]%n"
#endif
static const char *tstamp_fmt = TSTAMP_FMT;
static int tflg;