man > annotate-output(1)

ANNOTATE-OUTPUT(1)                     General Commands Manual                    ANNOTATE-OUTPUT(1)

NAME
       annotate-output - annotate program output with time and stream

SYNOPSIS
       annotate-output [options] program [args ...]

DESCRIPTION
       annotate-output will execute the specified program, while prepending every line with the cur‐
       rent time and O for stdout and E for stderr.


OPTIONS
       +FORMAT
              Controls the timestamp format, as per date(1).  Defaults to "%H:%M:%S".

       -h, --help
              Display a help message and exit successfully.


EXAMPLE
       $ annotate-output make
       21:41:21 I: Started make
       21:41:21 O: gcc -Wall program.c
       21:43:18 E: program.c: Couldn't compile, and took me ages to find out
       21:43:19 E: collect2: ld returned 1 exit status
       21:43:19 E: make: *** [all] Error 1
       21:43:19 I: Finished with exitcode 2


BUGS
       Since  stdout and stderr are processed in parallel, it can happen that some lines received on
       stdout will show up before later-printed stderr lines (and vice-versa).

       This is unfortunately very hard to fix with the current annotation strategy.  A fix would in‐
       volve switching to PTRACE'ing the process.  Giving nice a (much) higher priority over the ex‐
       ecuted program could however cause this behaviour to show up less frequently.

       The program does not work as well when the output is not linewise.  In  particular,  when  an
       interactive  program asks for input, the question might not be shown until after you have an‐
       swered it.  This will give the impression that the annotated program has hung, while  it  has
       not.


SEE ALSO
       date(1)


SUPPORT
       This  program  is community-supported (meaning: you'll need to fix it yourself).  Patches are
       however appreciated, as is any feedback (positive or negative).


AUTHOR
       This manual page was written by Jeroen van Wolffelaar <jeroen AT wolffelaar.nl> and can  be  re‐
       distributed  under the terms of the GPL version 2.  The annotate-output script itself was re-
       written by Johannes Schauer Marin Rodrigues <josch AT debian.org> and can be redistributed under
       the terms of the Expat license.

DEBIAN                                    Debian Utilities                        ANNOTATE-OUTPUT(1)

Generated by phpman v4.9.26-5-g7740029 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-30 17:50 @216.73.217.135
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!