script add -T fmt to print time-stamps
authorSimon J. Gerraty <sjg@FreeBSD.org>
Wed, 9 Mar 2022 21:33:03 +0000 (13:33 -0800)
committerSimon J. Gerraty <sjg@FreeBSD.org>
Wed, 9 Mar 2022 21:33:03 +0000 (13:33 -0800)
commit6c4afed5667a65f3c5bd308a934e7de8c0526954
tree65f29c446c1b2a9c1d3e460e1fb7f7150c6cbea6
parent7ecd99fa424df001028c5cddc52d25b29232f1af
script add -T fmt to print time-stamps

script -r is useful for recording time-stamps of when output
happened.  With -T, rather than playback the script in real-time
we simply print the time-stamps to show when the output happened.

This is very useful for example, for analyzing boot time activity.

If the fmt provided contains no % characters the default
%n@ %s [%Y-%m-%d %T]
is used, which lends itself to analysis by tools as well as humans.

Sponsored by: Juniper Networks, Inc.

Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D34511
usr.bin/script/script.1
usr.bin/script/script.c