Files
rdb/man/number.man
T

71 lines
2.3 KiB
Groff

.TH number "" "" "/rdb Command"
.PC "Insert a column-row number into a table or list"
\fBNumber < \fItableorlist\fR
.PP
.II "column^append row number"
.II "row^number column"
.II "append row-number column"
.II "table^append row-number column"
The command
.B number
creates appends a new column to the beginning of a table,
or as the first field in a list.
The newly created column contains the number of each row in the table.
Unlike the related command
.BR Number ,
.B number
writes the word ``number'' in lower-case letters as the header on the
column.
.SH Example
For example, consider the following table, called
.BR inventory :
.DM
Item# Amount Cost Value Description
------- ------- ------- ------- ---------------
1 3 5.00 15.00 rubber gloves
2 100 0.50 50.00 test tubes
3 5 8.00 40.00 clamps
4 23 1.98 45.54 plates
5 99 2.45 242.55 cleaning cloth
6 89 14.75 1312.75 bunsen burners
7 5 175.00 875.00 scales
.DE
.PP
Typing the command
.DM
number < inventory
.DE
.PP
yields the following result:
.DM
number Item# Amount Cost Value Description
------- ------- ------- ------- ------- ---------------
1 1 3 5.00 15.00 rubber gloves
2 2 100 0.50 50.00 test tubes
3 3 5 8.00 40.00 clamps
4 4 23 1.98 45.54 plates
5 5 99 2.45 242.55 cleaning cloth
6 6 89 14.75 1312.75 bunsen burners
7 7 5 175.00 875.00 scales
.DE
.PP
Note that the first column is the new number column.
.PP
.SH "See Also"
.B
Number,
addcol,
column,
jointable,
rename
.R
.SH Notes
To change the name of a column, use the command
.BR rename .
To move the row-number column to a different position within its table,
use the command
.BR column .
If you want to change the name of the number column
to something else, use the command
.BR rename .