112 lines
2.6 KiB
Groff
112 lines
2.6 KiB
Groff
.TH rmblank "" "" "/rdb Command"
|
|
.PC "Remove blank rows from a table"
|
|
\fBrmblank < \fItable\fR
|
|
.PP
|
|
.II "row^delete blank"
|
|
.II "blank row^delete"
|
|
.II delete
|
|
.II replace
|
|
The command
|
|
.B rmblank
|
|
deletes from
|
|
.I table
|
|
all input rows that consist of only white space (spaces and tabs).
|
|
The related programs
|
|
.B delete
|
|
and
|
|
.B replace
|
|
blank out records.
|
|
They can be used in transaction processing where the files
|
|
are too large to process and several users are updating them.
|
|
At a quiet time, the files can be compacted and reindexed.
|
|
.PP
|
|
Be sure to reindex any file that is processed by either
|
|
.B rmblank
|
|
or
|
|
.B compress.
|
|
.SH Example
|
|
First we have table
|
|
.BR inventory ,
|
|
as follows:
|
|
.DM
|
|
Item Amount Cost Value Description
|
|
---- ------ ---- ----- --------------
|
|
1 3 50 150 rubber gloves
|
|
2 100 5 500 test tubes
|
|
3 5 80 400 clamps
|
|
4 23 19 437 plates
|
|
5 99 24 2376 cleaning cloth
|
|
6 89 147 13083 bunsen burners
|
|
7 5 175 875 scales
|
|
.DE
|
|
.PP
|
|
Then we delete record 4
|
|
.DM
|
|
echo 4 | delete inventory Item
|
|
.DE
|
|
.PP
|
|
and
|
|
.B inventory
|
|
now appears as follows:
|
|
.DM
|
|
Item Amount Cost Value Description
|
|
---- ------ ---- ----- --------------
|
|
1 3 50 150 rubber gloves
|
|
2 100 5 500 test tubes
|
|
3 5 80 400 clamps
|
|
|
|
5 99 24 2376 cleaning cloth
|
|
6 89 147 13083 bunsen burners
|
|
7 5 175 875 scales
|
|
.DE
|
|
.PP
|
|
The command
|
|
.B see
|
|
shows the contents of
|
|
.B inventory
|
|
actually to be as follows:
|
|
.DM
|
|
Item^IAmount^ICost^IValue^IDescription $
|
|
----^I------^I----^I-----^I--------------$
|
|
1^I 3^I 50^I 150^Irubber gloves$
|
|
2^I 100^I 5^I 500^Itest tubes$
|
|
3^I 5^I 80^I 400^Iclamps$
|
|
^I ^I ^I ^I $
|
|
5^I 99^I 24^I 2376^Icleaning cloth$
|
|
6^I 89^I 147^I13083^Ibunsen burners$
|
|
7^I 5^I 175^I 875^Iscales$
|
|
.DE
|
|
.PP
|
|
Now the command
|
|
.DM
|
|
rmblank < inventory
|
|
.DE
|
|
.PP
|
|
removes lines that consist only of blanks.
|
|
After we run this command,
|
|
.B inventory
|
|
appears as follows:
|
|
.DM
|
|
Item Amount Cost Value Description
|
|
---- ------ ---- ----- --------------
|
|
1 3 50 150 rubber gloves
|
|
2 100 5 500 test tubes
|
|
3 5 80 400 clamps
|
|
5 99 24 2376 cleaning cloth
|
|
6 89 147 13083 bunsen burners
|
|
7 5 175 875 scales
|
|
.DE
|
|
.PP
|
|
Remember to reindex a file after you run
|
|
.B rmblank
|
|
on it.
|
|
.SH "See Also"
|
|
.B
|
|
compress,
|
|
delete,
|
|
index,
|
|
replace,
|
|
rmblank
|
|
.R
|
|
.SO rmblank
|