home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
400-499
/
ff473.lzh
/
CNewsSrc
/
cnews_src.lzh
/
man
/
dbz.man
< prev
next >
Wrap
Text File
|
1991-01-05
|
6KB
|
133 lines
DBZ(1) USER COMMANDS DBZ(1)
NNNNAAAAMMMMEEEE
dbz - operate on dbz databases of text
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ddddbbbbzzzz [ ----{aaaaxxxxcccc} ] [ ----tttt c ] [ ----llll length ] [ ----{qqqqiiiiuuuueeee} ] [ ----ffff old ]
[ ----pppp parms ] database file ...
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
_D_b_z is a shell-level interface to the _d_b_z(3z) database rou-
tines for indexed access to a text file.
The _d_a_t_a_b_a_s_e file must be a text file, one line per database
record, with the key the first field on the line. The ----tttt
option sets the field-separator character; the default is
tab. Setting the separator character to NUL (with ----tttt '''''''')
makes the whole line the key. Lines must not exceed 1023
bytes in length including the newline; this limit can be
increased with the ----llll option. The limitations and restric-
tions of _d_b_z(3z) must also be observed.
In the absence of options, _d_b_z creates a _d_b_z(3z) index for
the database; the index comprises files _d_a_t_a_b_a_s_e....ppppaaaagggg and
_d_a_t_a_b_a_s_e....ddddiiiirrrr in the same directory. Any previous index is
silently overwritten. The ----aaaa, ----xxxx, and ----cccc options specify
other operations.
With ----aaaa, _d_b_z appends lines from the _f_i_l_e(s) (standard input
if none) to the database, updating both the text file and
the indexes.
With ----xxxx, _d_b_z reads keys from the _f_i_l_e(s) (standard input if
none) and prints (on standard output) the corresponding
lines, if any, from the database. The input is in the form
of database lines, although only the keys are significant.
With ----cccc, _d_b_z checks the database for internal consistency.
The ----qqqq option causes this check to be done more quickly but
less thoroughly (each key is looked up in the index, but no
check is made to be sure that the index entry points to the
right place).
The ----iiii option suppresses the use of _d_b_z(3z)'s _i_n_c_o_r_e facil-
ity. This makes accesses slower, but keeps the files
current during updating and reduces startup/shutdown over-
head.
Normally, _d_b_z checks whether a key is already in the data-
base before adding it. The ----uuuu option suppresses this check,
speeding things up at the expense of safety.
A new index is normally created with default size, case map-
ping, and tagging. The default size is right for 90-100,000
Sun Microsystems Last change: 12 April 1990 1
DBZ(1) USER COMMANDS DBZ(1)
records. The default case mapping is right for RFC822
message-ids. See _d_b_z(3z) for what tagging is about. (Note,
these defaults can be changed when _d_b_z(3z) is installed.)
If the ----ffff option is given, size, case mapping, and tagging
are instead initialized based on the database _o_l_d. This is
mostly useful when creating a new generation of an existing
database. (See the description of _d_b_z_a_g_a_i_n in _d_b_z(3z) for
details.)
If the ----pppp option is given, the _p_a_r_m_s string specifies the
size, case mapping, and tagging. If _p_a_r_m_s is a single
decimal number, that is taken as the expected number of
records in the index, with case mapping and tagging
defaulted. Alternatively, _p_a_r_m_s can be three fields-a
decimal number, a case-mapping code character, and a hexade-
cimal tag mask-separated by white space. The decimal number
is, again, the expected number of records; 0 means ``use the
default''. See _d_b_z(3z) for possible choices of case-mapping
code, but in particular, 0000 means ``no case mapping''. See
_d_b_z(3z) for details on tag masks; 0 means ``use the
default''.
If the ----eeee option is given, the decimal number in ----pppp is taken
to be the exact table size, not the expected number of
records, and invocation of _d_b_z_s_i_z_e (see _d_b_z(3z)) to predict
a good size for that number of records is suppressed.
The ....ppppaaaagggg file is normally 5-6 bytes per record (based on the
estimate given to ----pppp or the previous history of the ----ffff data-
base). The ....ddddiiiirrrr file is tiny.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
dbz(3z)
HHHHIIIISSSSTTTTOOOORRRRYYYY
Written at U of Toronto by Henry Spencer, for the C News
project. See _d_b_z(3z) for the history of the underlying
database routines.
BBBBUUUUGGGGSSSS
There are a number of undocumented options with obscure
effects, meant for debugging and regression testing of
_d_b_z(3z).
Permissions for the index files probably ought to be taken
from those of the base file.
The line-length limit is a blemish, alleviated only slightly
by ----llll.
Sun Microsystems Last change: 12 April 1990 2