1ANNOTATE-OUTPUT(1) General Commands Manual ANNOTATE-OUTPUT(1)
2
3
4
6 annotate-output - annotate program output with time and stream
7
9 annotate-output [options] program [args ...]
10
12 annotate-output will execute the specified program, while prepending
13 every line with the current time and O for stdout and E for stderr.
14
15
17 +FORMAT
18 Controls the timestamp format, as per date(1). Defaults to
19 "%H:%M:%S".
20
21 -h, --help
22 Display a help message and exit successfully.
23
24
26 $ annotate-output make
27 21:41:21 I: Started make
28 21:41:21 O: gcc -Wall program.c
29 21:43:18 E: program.c: Couldn't compile, and took me ages to find out
30 21:43:19 E: collect2: ld returned 1 exit status
31 21:43:19 E: make: *** [all] Error 1
32 21:43:19 I: Finished with exitcode 2
33
34
36 Since stdout and stderr are processed in parallel, it can happen that
37 some lines received on stdout will show up before later-printed stderr
38 lines (and vice-versa).
39
40 This is unfortunately very hard to fix with the current annotation
41 strategy. A fix would involve switching to PTRACE'ing the process.
42 Giving nice a (much) higher priority over the executed program could
43 however cause this behaviour to show up less frequently.
44
45 The program does not work as well when the output is not linewise. In
46 particular, when an interactive program asks for input, the question
47 might not be shown until after you have answered it. This will give
48 the impression that the annotated program has hung, while it has not.
49
50
52 date(1)
53
54
56 This program is community-supported (meaning: you'll need to fix it
57 yourself). Patches are however appreciated, as is any feedback (posi‐
58 tive or negative).
59
60
62 This manual page was written by Jeroen van Wolffelaar <jeroen@wolffe‐
63 laar.nl> and can be redistributed under the terms of the GPL version 2.
64 The annotate-output script itself was re-written by Johannes Schauer
65 Marin Rodrigues <josch@debian.org> and can be redistributed under the
66 terms of the Expat license.
67
68
69
70DEBIAN Debian Utilities ANNOTATE-OUTPUT(1)