[UP]


Manual Reference Pages  - ttee (1)

NAME

ttee(1f) - [TIME] write input to stdout and a file with timing info. (LICENSE:PD)

CONTENTS

Synopsis
Description
Limits
Examples
Author
License

SYNOPSIS

ttee [[ -o|--output] filename(s)] [ -a|--append] [ --timestamp FLAG]] ... [ -fmt FORMAT] [ --help | --version]

DESCRIPTION

Read from standard input and write to standard output and files with an optional timestamp in front of each line.

-o|--output FILENAME(S) specify name of output file(s). If the filenames are first the keyword -o|--output is optional.

-a|--append append to the given output file(s), do not overwrite

-t|--timestamp FLAG which files to add the timestamp to. Default is "all" Allowed values are stdout, output, all, none.

-fmt FORMAT Change format for timestamp prefix using a call to now(3f).

          Description                                        Example

Base time array: (1) %Y -- year, yyyy 2019 (2) %M -- month of year, 01 to 12 11 (3) %D -- day of month, 01 to 31 28 %d -- day of month, with suffix (1st, 2nd,...) 28th (4) %Z -- minutes from UTC -0300 %z -- -+hh:mm from UTC -05:00 %T -- -+hhmm from UTC -0500 (5) %h -- hours, 00 to 23 20 %H -- hour (1 to 12, or twelve-hour clock) 8 %N -- midnight< AM <=noon; noon<= PM <midnight PM (6) %m -- minutes, 00 to 59 44 (7) %s -- sec, 00 to 59 33 (8) %x -- milliseconds 000 to 999 192 Conversions: %E -- Unix Epoch time 1574991873.1920049 %e -- integer value of Unix Epoch time 1574991873 %J -- Julian date 2458816.5726063889 %j -- integer value of Julian Date(Julian Day) 2458816 %O -- Ordinal day (day of year) 332 %o -- Whole days since Unix Epoch date 18229 %U -- day of week, 1..7 Sunday=1 5 %u -- day of week, 1..7 Monday=1 4 %i -- ISO week of year 1..53 48 %I -- iso-8601 week-numbering date(yyyy-Www-d) 2019-W48-4 Names: %l -- abbreviated month name Nov %L -- full month name November %w -- first three characters of weekday Thu %W -- weekday name Thursday %p -- phase of moon New %P -- percent of way from new to full moon 12% Literals: %% -- a literal % % %t -- tab character %b -- blank character %B -- exclamation(bang) character ! %n -- new line (system dependent)

%q -- single quote (apostrophe) ’ %Q -- double quote " Program timing: %c -- CPU_TIME(3f) output 0.29999999999999999E-001 %C -- number of times this routine is used 1 %S -- seconds since last use of this format 0.0000000000000000 %k -- time in seconds from SYSTEM_CLOCK(3f) 222583.703 %K -- time in clicks from SYSTEM_CLOCK(3f) 222583697

If no percent (%) is found in the format one of several alternate substitutions occurs.

If the format is composed entirely of one of the following keywords the following substitutions occur: "iso-8601", "iso" ==> %Y-%M-%DT%h:%m:%s%z 2019-11-28T20:44:33-05:00 "iso-8601W", "isoweek" ==> %I 2019-W48-4 "sql" ==> "%Y-%M-%D %h:%m:%s.%x" "2019-11-28 20:44:33.197" "sqlday" ==> "%Y-%M-%D" "2019-11-28" "sqltime" ==> "%h:%m:%s.%x" "20:44:33.197" "rfc-2822" ==> %w, %D %l %Y %h:%m:%s %T Thu, 28 Nov 2019 20:44:33 -0500 "rfc-3339" ==> %Y-%M-%DT%h:%m:%s%z 2019-11-28T20:44:33-05:00 "date" ==> %w %l %D %h:%m:%s UTC%z %Y Thu Nov 28 20:44:33 UTC-05:00 2019 "short" ==> %w, %l %d, %Y %H:%m:%s %N UTC%z Thu, Nov 28th, 2019 8:44:33 PM UTC-05:00 "long"," " ==> %W, %L %d, %Y %H:%m:%s %N UTC%z Thursday, November 28th, 2019 8:44:33 PM UTC-05:00 "suffix" ==> %Y%D%M%h%m%s 20192811204433 "formal" ==> The %d of %L %Y The 28th of November 2019 "lord" ==> the %d day of %L in the year of our Lord %Y the 28th day of November in the year of our Lord 2019 "easter" ==> FOR THE YEAR OF THE CURRENT DATE: Easter day: the %d day of %L in the year of our Lord %Y "all" ==> A SAMPLE OF DATE FORMATS otherwise the following words are replaced with the most common macros: year %Y 2019 month %M 11 day %D 28 timezone %z -05:00 hour %h 20 minute %m 44 second %s 33 millisecond %x 200 epoch %e 1574991873 julian %j 2458816 ordinal %O 332 weekday %u 4 if none of these keywords are found then every letter that is a macro is assumed to have an implied percent in front of it. For example: YMDhms ==> %Y%M%D%h%m%s ==> 20191128204433

--help display this help and exit
--version
  output version information and exit

LIMITS

Program limits:
o Input line width maximum is 1024 characters.
o Maximum length of output filenames is 4098, individual filename is 1024.
o Minimum number of output files is probably at least 90; but is system dependent.

EXAMPLES

Basic command usage:

    # write stdout of "program" to ttee.out with a timestamp and stdout
    program|ttee --output ttee.out --timestamp output|grep -i iteration

# write stdout of "program" to log.txt and stdout with a Julian Day program|ttee log.txt -fmt "%J :" 2457565.488 :Iteration 1 : Error: 1.20 2457565.558 :Iteration 2 : Error: 0.08 2467569.684 :Iteration 3 : Error: 1.2e-3

AUTHOR

John S. Urban

LICENSE

Public Domain


ttee (1) March 11, 2021
Generated by manServer 1.08 from 207aa1f5-30ea-435b-a885-3375ca9febf0 using man macros.