DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T m

⟦be2ab6afe⟧ TextFile

    Length: 3748 (0xea4)
    Types: TextFile
    Names: »mkdbm.an«

Derivation

└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
    └─⟦2fafebccf⟧ »EurOpenD3/mail/smail3.1.19.tar.Z« 
        └─⟦bcd2bc73f⟧ 
            └─⟦this⟧ »man/man8/mkdbm.an« 

TextFile

.\" @(#)mkdbm.an	1.8 9/26/88 14:06:14
.TH MKDBM X_MAN8_EXT_X "31 January 1988" "Local"
.SH NAME
mkdbm \- build a DBM file suitable for use by smail
.SH SYNOPSIS
.B X_UTIL_BIN_DIR_X/mkdbm
.RB "[ " \-f " ]"
.RB "[ " \-v " ]"
.RB "[ " \-n " ]"
.RB "[ " \-d " ]"
[
.B \-o
.I output-name
]
.RI "[ " file " ...  ]"
.SH DESCRIPTION
.I Mkdbm
takes lines as input and writes them to a set of files in the format
produced by the
.IR dbm (3X)
function library.  The key is formed from the characters up to, but
not including, a colon (``:'') or white space character.  The data
after the colon or white space character forms the value associated
with the key.  If
.B \-f
is given, the key is folded to lower case before being stored in the
database.
.PP
If no input files are specified, the standard input is read.  In
addition, if a filename of
.B \-
is given, the standard input is inserted at that point.
.PP
The
.B \-o
option sets the name for the DBM database.  If not specified
explicitly, the name of the database is taken from the first
.I file
argument.  If no
.I file
arguments are given, or the first file argument is
.BR \-
then a database is created in the current directory with the name
.IR dbm .
.PP
The
.I mkdbm
program can be used
to produce DBM files which can then be read by a
.IR smail (X_MAN8_EXT_X)
pathalias router or aliasfile director.
The router or directory should be configured to use the
.I dbm
file access protocol.  See
.IR smail (X_MAN5_EXT_X)
for more information on routers and directors.
For some databases,
.IR mkline (X_MAN8_EXT_X)
should be used to form single line records with comments and extra
white-space removed.
.PP
The generated database contains a single nul byte at the end of each
key and value.  Also a single record containing ``@'' as a key and
value is created for compatibility with the Berkeley
.IR sendmail (X_MAN8_EXT_X)
program's alias files.  The ending nul bytes can be suppressed with
the
.B \-n
option, and the extra ``@'' record can be suppressed with the
.B \-d
option.  Use of
.B \-n
is incompatible with the smail
.B dbm
file access method.
.PP
When creating the database, temporary DBM files are built in the same
directory as the eventual output files.  Then, when it is completed,
any DBM files currently existing under the target name are removed,
.I mkdbm
sleeps between one and two seconds, and then the temporary DBM files
are moved to the target names.  This database creation method is not
compatible with the locking method used by Berkeley
.IR sendmail .
.PP
If the
.B \-v
flags is specified
.I mkdbm
writes statistics to the standard output.
.SH EXAMPLE
As an example of the use of
.I mkdbm
consider a file,
.IR paths ,
containing the routing information:
.PP
.RS
.nf
.ta \w'Stargate.COM'u+3n
\&.COM	sun!%s
Stargate.COM	ames!cmcl2!uiucdcs!stargate!%s
ames	ames!%s
\&.ATT.COM	mtune!%s
mtune	mtune!%s
.DT
.fi
.RE
.PP
Given this file, the command
.I "mkdbm -f paths"
will produce a dbm database in the files
.I paths.pag
and
.I paths.dir
containing the above entries, with downcased keys.
For example, one entry will contain the key
.I stargate.com
with an associated value of
.IR ames!cmcl2!uiucdcs!stargate!%s .
.RE
.SH "SEE ALSO"
.IR mkaliases (X_MAN8_EXT_X),
.IR mkline (X_MAN8_EXT_X),
.IR mksort (X_MAN8_EXT_X),
.IR smail (X_MAN5_EXT_X),
.IR smail (X_MAN8_EXT_X),
.IR pathalias (X_MAN8_EXT_X).
.SH FILES
.PD 0
.TP
dbmXXXXXX.pag
.TP \w'dbmXXXXXX.pag'+4n
dbmXXXXXX.dir
.PD
The temporary files created in the same directory as the eventual
output files.
.SH COPYRIGHT
Copyright(C)1987, 1988 Ronald S. Karr and Landon Curt Noll
.br
See a file COPYING,
distributed with the source code,
or type
.I "smail -bc"
for distribution rights and restrictions
associated with this software.