Rdb: Ruby-Nachbau der MWC /rdb-Werkzeuge
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
.TH widest "" "" "/rdb Command"
|
||||
.PC "Output the width of the widest entries in a table"
|
||||
\fBwidest < \fItable\fR
|
||||
.PP
|
||||
.II "column^find widest entry"
|
||||
.II "column^find widest rows"
|
||||
The command
|
||||
.B widest
|
||||
reads
|
||||
.I table
|
||||
and writes to the standard output a second table
|
||||
that gives the width of the widest entry in each column.
|
||||
.SH Example
|
||||
The command
|
||||
.DM
|
||||
widest < inventory
|
||||
.DE
|
||||
.PP
|
||||
reads table
|
||||
.B inventory
|
||||
and writes something like the following to the standard output:
|
||||
.DM
|
||||
Item Amount Cost Value Description
|
||||
---- ------ ---- ----- --------------
|
||||
4 6 4 5 14
|
||||
.DE
|
||||
.PP
|
||||
Each number is the width, in characters,
|
||||
.BR inventory 's
|
||||
the widest entry in that column.
|
||||
You can use this information for formatting.
|
||||
.B /rdb
|
||||
does not require a schema because it gets the parameters
|
||||
of the tables from the tables themselves.
|
||||
.SH "See Also"
|
||||
.B
|
||||
width
|
||||
.R
|
||||
.SO widest
|
||||
Reference in New Issue
Block a user