310 lines
8.2 KiB
HTML
310 lines
8.2 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of tbl-dctrl</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>tbl-dctrl</H1>
|
|
Section: Debian administrator's manual (1)<BR>Updated: 2006-04-02<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
tbl-dctrl - generate tabular representations of data in dctrl format
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>tbl-dctrl</B>
|
|
|
|
[
|
|
<I>options</I>
|
|
|
|
] [
|
|
<B>-c</B>
|
|
|
|
<I>column-specification</I> ...
|
|
|
|
]
|
|
[
|
|
<I>filename</I>
|
|
|
|
] ...
|
|
<P>
|
|
<B>tbl-dctrl</B>
|
|
|
|
<B>--version</B>
|
|
|
|
<P>
|
|
<B>tbl-dctrl</B>
|
|
|
|
<B>--help</B>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>tbl-dctrl</B>
|
|
|
|
creates tabular representations of data given to it in Debian control
|
|
file format.
|
|
<P>
|
|
|
|
By default,
|
|
<B>tbl-dctrl</B>
|
|
|
|
reads the whole database, looking for the longest entry in each
|
|
requested column; it then outputs a table, with borders and column
|
|
titles, where each column is just wide enough to fit the longest
|
|
entry.
|
|
Most of this behaviour can be customized as described below.
|
|
<P>
|
|
|
|
A column is requested by specifying the
|
|
<B>-c</B> (<B>--column</B>)
|
|
|
|
switch with a column specification.
|
|
The simplest kind of a column specification consists solely of the name
|
|
of a field.
|
|
In such a case,
|
|
<B>tbl-dctrl</B>
|
|
|
|
will include in the output a column whose title is the literal column
|
|
specification and whose data is drawn from fields with that name.
|
|
If no
|
|
<B>-c</B>
|
|
|
|
options are given,
|
|
<B>tbl-dctrl</B>
|
|
|
|
will use all fields in the input in the order in which they first appear.
|
|
<P>
|
|
|
|
There are two optional additions one can make to a column
|
|
specification.
|
|
Prefixing the field name with some text followed by an equality sign
|
|
(for example,
|
|
<B>-c 'Package name=Package'</B>)
|
|
|
|
modifies the column in such a way that the text before the equality
|
|
sign is used as the column title, while the text after the equality
|
|
sign is used as the name of the field from which data is drawn.
|
|
One can also append a colon followed by a positive whole number to the
|
|
field name. In such a case, the number after the colon specifies the
|
|
width of the column.
|
|
These two additions can be used separately or together.
|
|
If there are more than one colon, the last one is significant.
|
|
If there are more than one equals sign, the first one is significant.
|
|
Other colons and equals signs are used simply as data.
|
|
Note that the whole column specification must be given to
|
|
<B>tbl-dctrl</B>
|
|
|
|
as one argument, so if it contains spaces, it must be quoted for the
|
|
shell.
|
|
<P>
|
|
|
|
If all requested columns have a specified width,
|
|
<B>tbl-dctrl</B>
|
|
|
|
will produce output immediately, not waiting for the whole input to be
|
|
read in.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-d </B><I>delimiter</I>, <B>--delimiter=</B><I>delimiter<DD>
|
|
Instead of drawing nice borders to the table, use the specified
|
|
delimiter</I>
|
|
|
|
string to delimit columns in a row.
|
|
<DT id="2"><B>-H</B>, <B>--no-heading<DD>
|
|
Do not print a table heading (column titles).
|
|
<DT id="3">-l </B><I>level</I>, <B>--errorlevel=</B><I>level<DD>
|
|
Set log level to
|
|
level</I>.
|
|
|
|
<I>level</I>
|
|
|
|
is one of
|
|
<B>fatal</B>, <B>important</B>, <B>informational</B> and <B>debug</B>,
|
|
|
|
but the last may not be available,
|
|
depending on the compile-time options. These categories are given
|
|
here in order; every message that is emitted when
|
|
<B>fatal</B>
|
|
|
|
is in effect, will be emitted in the
|
|
<B>important</B>
|
|
|
|
error level, and so on. The default is
|
|
<B>important</B>.
|
|
|
|
<DT id="4"><B>-V</B>, <B>--version</B>
|
|
|
|
<DD>
|
|
Print out version information.
|
|
<DT id="5"><B>-C</B>, <B>--copying</B>
|
|
|
|
<DD>
|
|
Print out the copyright license. This produces much output; be sure
|
|
to redirect or pipe it somewhere (such as your favourite pager).
|
|
<DT id="6"><B>-h</B>, <B>--help</B>
|
|
|
|
<DD>
|
|
Print out a help summary.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>OPERANDS</H2>
|
|
|
|
<B>tbl-dctrl</B>
|
|
|
|
will read its input from the files named on the command line,
|
|
in the specified order.
|
|
A file called
|
|
<B>-</B>
|
|
|
|
represents the program's standard input stream.
|
|
If no files are named, the program behaves as if
|
|
<B>-</B>
|
|
|
|
alone had been named, that is, input is read from the standard input
|
|
stream.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>STDIN</H2>
|
|
|
|
The standard input stream may be used as input as specified above in
|
|
the
|
|
<B>OPERANDS</B>
|
|
|
|
section.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>INPUT FILES</H2>
|
|
|
|
All input to
|
|
<B>tbl-dctrl</B>
|
|
|
|
is in the format of a Debian control file.
|
|
<P>
|
|
|
|
A Debian control (dctrl) file is a semistructured single-table
|
|
database stored in a machine-parseable text file.
|
|
Such a database consists of a set of records; each record is a mapping
|
|
from field names to field content.
|
|
Textually, records are separated by empty lines, while each field is
|
|
encoded as one or more nonempty lines inside a record.
|
|
A field starts with its name, followed by a colon, followed by the
|
|
field content.
|
|
The colon must reside on the first line of the field, and the first
|
|
line must start with no whitespace.
|
|
Subsequent lines, in contrast, always start with linear whitespace
|
|
(one or more space or tab characters).
|
|
<P>
|
|
|
|
When input is read from multiple files, a record separator is implicit
|
|
between two adjacent files.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>ENVIRONMENT VARIABLES</H2>
|
|
|
|
The standard locale environment, specifically its character set
|
|
setting, affects the interpretation of input and output as character
|
|
streams.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>ASYNCHRONOUS EVENTS</H2>
|
|
|
|
Standard UNIX signals have their usual meaning.
|
|
<A NAME="lbAK"> </A>
|
|
<H2>STDOUT</H2>
|
|
|
|
All output is sent to the standard output stream.
|
|
The output is a tabular representation of the input database restricted
|
|
to the specified fields. Logically, the output is a table; when the
|
|
<B>-d</B>
|
|
|
|
option is used, this table is represented simply by separating columns
|
|
in each row by the specified
|
|
<I>delimiter</I>;
|
|
|
|
when the option is not used, a
|
|
frame is drawn around the table. The order of the columns is the same
|
|
as the order of the column specifications on the command line.
|
|
<A NAME="lbAL"> </A>
|
|
<H2>OUTPUT FILES</H2>
|
|
|
|
There are no output files.
|
|
<A NAME="lbAM"> </A>
|
|
<H2>EXIT STATUS</H2>
|
|
|
|
This utility exits with
|
|
<B>0</B>
|
|
|
|
when successful. It uses a nonzero exit
|
|
code inconsistently when an error is noticed (this is a bug).
|
|
<A NAME="lbAN"> </A>
|
|
<H2>CONSEQUENCES OF ERRORS</H2>
|
|
|
|
In case of errors in the input, the output will be partially or
|
|
completely garbage. In case of errors in invocation, the program will
|
|
refuse to function.
|
|
<A NAME="lbAO"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
The following command line pipe outputs a table of all packages, with
|
|
their maintainer data, sorted by the maintainer data, that have no
|
|
content:
|
|
<PRE>
|
|
% grep-available -FInstalled-Size --eq 0 | sort-dctrl -kMaintainer - \
|
|
| tbl-dctrl -cPackage -cMaintainer
|
|
</PRE>
|
|
|
|
<A NAME="lbAP"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
The
|
|
<B>tbl-dctrl</B>
|
|
|
|
program and this manual page were written by Antti-Juhani Kaijanaho.
|
|
<A NAME="lbAQ"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+apt-cache">apt-cache</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+ara">ara</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dpkg-awk">dpkg-awk</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dpkg-query">dpkg-query</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+grep-dctrl">grep-dctrl</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+sort-dctrl">sort-dctrl</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+dpkg">dpkg</A></B>(8)
|
|
|
|
<P>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="7"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="8"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="9"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="10"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="11"><A HREF="#lbAF">OPERANDS</A><DD>
|
|
<DT id="12"><A HREF="#lbAG">STDIN</A><DD>
|
|
<DT id="13"><A HREF="#lbAH">INPUT FILES</A><DD>
|
|
<DT id="14"><A HREF="#lbAI">ENVIRONMENT VARIABLES</A><DD>
|
|
<DT id="15"><A HREF="#lbAJ">ASYNCHRONOUS EVENTS</A><DD>
|
|
<DT id="16"><A HREF="#lbAK">STDOUT</A><DD>
|
|
<DT id="17"><A HREF="#lbAL">OUTPUT FILES</A><DD>
|
|
<DT id="18"><A HREF="#lbAM">EXIT STATUS</A><DD>
|
|
<DT id="19"><A HREF="#lbAN">CONSEQUENCES OF ERRORS</A><DD>
|
|
<DT id="20"><A HREF="#lbAO">EXAMPLES</A><DD>
|
|
<DT id="21"><A HREF="#lbAP">AUTHOR</A><DD>
|
|
<DT id="22"><A HREF="#lbAQ">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:28 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|