super tee 1.5
super tee is a simple application which duplicates both the standard output and standard error streams from a command to a file.
Simply duplicates both the standard output and standard error streams from a command to a log file, while marking the lines in the log to indicate which stream the lines came from. This is essentially the same idea as the standard UNIX tee command, except that in order to use the tee command for both streams requires that you lose the distinction between the two streams.
super_tee solves this problem by invoking the command as a child of super_tee, rather than just piping the output of the command into it, as tee does.
Since the goal is to keep the differentiation in the output log between the two input streams, super_tee also has the nice property of untangling lines that may have been interleaved together from the two streams.
As an additional feature, timestamps can be added to each line as they are written to the log.
$ gcc -O3 -o super_tee super_tee.c
supertee [-tna] [cmdline...]
-t Add time stamps to the output
-n Suppress the markings indicating the source of the lines (stdout vs stderr)
-a Append to the output file rather than overwriting