Rdb: Ruby-Nachbau der MWC /rdb-Werkzeuge
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
.TH compresss "" "" "/rdb Command"
|
||||
.PC "Squeeze out all leading and trailing blanks"
|
||||
\fBcompresss [-b] < \fItableorlist\fR
|
||||
.PP
|
||||
.II "table^compress"
|
||||
.II "compress table"
|
||||
The command
|
||||
.B compresss
|
||||
removes all leading and trailing blanks from every column or field in
|
||||
.IR tableorlist .
|
||||
You an use it to save disk space.
|
||||
.PP
|
||||
Please note that the name \fBcompresss\fR is not a typographical error.
|
||||
The command is spelled in this way to avoid collision with the
|
||||
COHERENT command
|
||||
.BR compress ,
|
||||
which behaves very differently from
|
||||
.BR compresss .
|
||||
.PP
|
||||
.B compresss
|
||||
is almost the opposite of the command
|
||||
.BR justify .
|
||||
Your files are not as pretty when compressed as they are when
|
||||
justified, but they are smaller \(em
|
||||
usually one third the size or less.
|
||||
Therefore, they take less disk space and are much faster to process;
|
||||
after all,
|
||||
most of the time used to execute data-base programs consists
|
||||
of moving data from the disk to the memory and, sometimes, back to
|
||||
the disk.
|
||||
.PP
|
||||
Multiple blanks that separate words are left alone.
|
||||
.SH Options
|
||||
.B compresss
|
||||
recognizes the following option:
|
||||
.IP \fB\-b\fR
|
||||
Drop blank lines.
|
||||
Don't use this option with list files!
|
||||
.SH Example
|
||||
For example, consider table
|
||||
.BR oldjournal ,
|
||||
which is as follows:
|
||||
.DM
|
||||
Date Account Debit Credit Description
|
||||
------ ------- ----- ------ -----------
|
||||
890102 101 25000 cash from loan
|
||||
890102 211.1 25000 loan number #378-14 Bank Amerigold
|
||||
890103 150.1 10000 test equipment from Zarkoff
|
||||
890103 101 5000 cash payment
|
||||
890103 211.2 5000 note payable to Zarkoff Equipment
|
||||
890104 130 30000 inventory - parts from CCPSC
|
||||
890104 201.1 15000 accounts payable to CCPSC
|
||||
890104 101 15000 cash payment to CCPSC for parts
|
||||
.DE
|
||||
.PP
|
||||
After we run the command
|
||||
.DM
|
||||
compresss <old.journal | see
|
||||
.DE
|
||||
.PP
|
||||
.B old.journal
|
||||
has no extra spaces.
|
||||
We prove this by piping the output to the
|
||||
.B /rdb
|
||||
command
|
||||
.BR see ,
|
||||
which displays the following output:
|
||||
.DM
|
||||
Date^IAccount^IDebit^ICredit^IDescription$
|
||||
----^I-------^I-----^I------^I-----------$
|
||||
890102^I101^I25000^I^Icash from loan$
|
||||
890102^I211.1^I^I25000^Iloan number #378-14 Bank Amerigold$
|
||||
890103^I150.1^I10000^I^Itest equipment from Zarkoff$
|
||||
890103^I101^I^I5000^Icash payment$
|
||||
890103^I211.2^I^I5000^Inote payable to Zarkoff Equipment$
|
||||
890104^I130^I30000^I^Iinventory - parts from CCPSC$
|
||||
890104^I201.1^I^I15000^Iaccounts payable to CCPSC$
|
||||
890104^I101^I^I15000^Icash payment to CCPSC for parts$
|
||||
.DE
|
||||
.PP
|
||||
Note that
|
||||
.B see
|
||||
turns all of the tabs into \fB^I\fR
|
||||
and puts a dollar sign `$' at the end of each row to show us that
|
||||
there are no spaces at the end.
|
||||
.SH "See Also"
|
||||
.B
|
||||
justify,
|
||||
rmblank
|
||||
.R
|
||||
.SH Notes
|
||||
Do not confuse this command with the COHERENT system's command
|
||||
.BR compress ,
|
||||
which produces binary output that cannot be read by any
|
||||
.B /rdb
|
||||
command.
|
||||
Reference in New Issue
Block a user