Rdb: Ruby-Nachbau der MWC /rdb-Werkzeuge
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
.TH headon "" "" "/rdb Command"
|
||||
.PC "Add an /rdb header to a table"
|
||||
\fBheadon < \fItable\fR
|
||||
.PP
|
||||
.II "table^add head"
|
||||
.II "add head to table"
|
||||
The command
|
||||
.B headon
|
||||
appends an
|
||||
.B /rdb
|
||||
header onto
|
||||
.IR table .
|
||||
Tables have a two-line column head.
|
||||
When you have a table without an
|
||||
.B /rdb
|
||||
header, perhaps created by another program, you can add a head to it.
|
||||
You can also do this in a pipe and send the new table to other
|
||||
.B /rdb
|
||||
commands for processing.
|
||||
.SH Example
|
||||
If you want to treat the file
|
||||
.B /etc/passwd
|
||||
as a table for
|
||||
.B /rdb
|
||||
command processing, use
|
||||
.BR headon ,
|
||||
as follows:
|
||||
.DM
|
||||
tr ':' ' ' < /etc/passwd | headon | justify
|
||||
.DE
|
||||
.PP
|
||||
Note the use of the COHERENT command
|
||||
.B tr
|
||||
to translate a colon `:' into a tab character;
|
||||
and the use of the
|
||||
.B /rdb
|
||||
command
|
||||
.B justify
|
||||
to align the columns.
|
||||
This produces something like the following:
|
||||
.DM
|
||||
1 2 3 4 5 6
|
||||
------ ------------- --- --- --------------- -------------
|
||||
root dVAYxSsJy10Fg 0 3 Super User /
|
||||
daemon 1 12 background /
|
||||
bin rVOhF49RpZXEY 2 2 binary programs /bin
|
||||
uucp 5 1 UUCP /usr/lib/uucp
|
||||
lp 71 2 Line Printer /usr/spool/lp
|
||||
guest 100 100 Guest User /usr/guest
|
||||
rod 0 0 Rod Manis /usr/rod
|
||||
.DE
|
||||
.PP
|
||||
Be sure the first line of the table has no blank fields or
|
||||
.B headon
|
||||
counts the wrong number of fields.
|
||||
.SH "See Also"
|
||||
.B
|
||||
headoff,
|
||||
insertdash,
|
||||
justify,
|
||||
rmblank
|
||||
.R
|
||||
.br
|
||||
COHERENT Lexicon:
|
||||
.B
|
||||
passwd,
|
||||
tr
|
||||
.R
|
||||
.SO headon
|
||||
Reference in New Issue
Block a user