Man page - annotate-output(1)
Packages contains this manual
- devscripts.conf(5)
- build-rdeps(1)
- whodepends(1)
- checkbashisms(1)
- annotate-output(1)
- namecheck(1)
- transition-check(1)
- debrsign(1)
- dpkg-genbuilddeps(1)
- deb-reversion(1)
- ltnu(1)
- debbisect(1)
- cowpoke(1)
- dscextract(1)
- list-unreleased(1)
- getbuildlog(1)
- debclean(1)
- chdist(1)
- rc-alert(1)
- mk-origtargz(1)
- deb2docker(1)
- edit-patch(1)
- what-patch(1)
- dd-list(1)
- tagpending(1)
- suspicious-source(1)
- bts(1)
- deb-why-removed(1)
- devscripts(7)
- plotchangelog(1)
- uscan(1)
- mergechanges(1)
- debsnap(1)
- debftbfs(1)
- hardening-check(1)
- dscverify(1)
- dget(1)
- who-uploads(1)
- debrepro(1)
- git-deborig(1)
- deb-janitor(1)
- deb2apptainer(1)
- dep-14-convert-git-branch-names(1)
- dep3changelog(1)
- wnpp-alert(1)
- pts-unsubscribe(1)
- sadt(1)
- debc(1)
- debdiff-apply(1)
- nmudiff(1)
- add-patch(1)
- dpkg-depcheck(1)
- rmadison(1)
- debsign(1)
- deb2singularity(1)
- diff2patches(1)
- debi(1)
- mk-build-deps(1)
- origtargz(1)
- debrebuild(1)
- deb-check-file-conflicts(1)
- reproducible-check(1)
- mass-bug(1)
- debootsnap(1)
- salsa(1)
- svnpath(1)
- debrelease(1)
- pts-subscribe(1)
- debdiff(1)
- dch(1)
- debcheckout(1)
- wrap-and-sort(1)
- wnpp-check(1)
- manpage-alert(1)
- dcmd(1)
- who-permits-upload(1)
- debchange(1)
- archpath(1)
- debuild(1)
- grep-excuses(1)
- debcommit(1)
- uupdate(1)
apt-get install devscripts
Available languages:
en fr deManual
ANNOTATE-OUTPUT
NAMESYNOPSIS
DESCRIPTION
OPTIONS
EXIT STATUS
EXAMPLE
CAVEATS AND BUGS
SEE ALSO
SUPPORT
AUTHOR
NAME
annotate-output - annotate program output with time and stream
SYNOPSIS
annotate-output [ options ...] [--] program [ args ...]
DESCRIPTION
annotate-output
executes
program
with
args
as arguments and
prepends printed lines with a format string followed by an
indicator for the stream on which the line was printed
followed by a colon and a single space.
The stream indicators are
I
for information from
annotate-output
as well as
O
for STDOUT and
E
for STDERR from
program
.
OPTIONS
+FORMAT
A format string that may use
the conversion specifiers from the
date
(1)-utility.
The printed string is separated from the following stream
indicator by a single space. May be overridden by later
options that specify the format string.
Defaults to "%H:%M:%S".
--raw-date-format FORMAT
A format string that may use the conversion specifiers from the date (1)-utility. There is no separator between the printed string and the following stream indicator. May be overridden by later options that specify the format string.
|
-- |
Ends option parsing (unless it is itself an argument to an option). |
-h , --help
Display a help message.
EXIT STATUS
If program is invoked, the exit status of annotate-output shall be the exit status of program ; otherwise, annotate-output shall exit with one of the following values:
|
0 |
-h or --help was used. |
|||
|
125 |
An error occurred in annotate-output . |
|||
|
126 |
program was found but could not be invoked. |
|||
|
127 |
program could not be found or was not specified. |
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
CAVEATS AND 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 involve switching to
PTRACE’ing the process. Giving nice a (much) higher
priority over
program
could however cause this
behaviour to show up less frequently.
annotate-output
expects
program
to output (text) lines (as specified
by POSIX) to STDOUT and STDERR.
In particular, it leads to undefined behaviour when lines
are printed that contain NUL bytes. It further may lead to
undefined behaviour when lines are printed that contain
bytes that do not form valid characters in the current
locale.
When an interactive program asks for input, the question might not be shown until after you have answered it. This will give the impression that program has hung, while it has not.
annotate-output
is implemented as a script in the Shell Command Language.
Shells typically set various (shell) variables when started
and may set the ‘export‘ attribute on some of
them. They further initialise (shell) variables from their
own environment (as set by the caller of the shell
respectively the caller of
annotate-output
) and set
the ‘export‘ attribute on them.
It follows from this, that when the caller of
annotate-output
wants to set the environment
(variables) of
program
, they may get overridden or
additional ones may get added by the shell.
Further, environment variables are in principle allowed to
have names (for example ‘.‘) that are not valid
shell variable names. POSIX does not specify whether or not
such environment variables are exported to programs invoked
from the shell. No assumptions can thus be made on whether
such environment variables will be exported correctly or at
all to
program
.
SEE ALSO
date (1)
SUPPORT
annotate-output 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@wolffelaar.nl> and can be redistributed under the terms of the GPL version 2. The annotate-output script itself was re-written by Johannes Schauer Marin Rodrigues <josch@debian.org> and can be redistributed under the terms of the Expat license.