DBMSTORE(1)

NAME

dbmstore - store text in dbm files

SYNOPSIS

dbmstore [ options ] dbmfile key value
dbmstore [ options ] -f inputfile dbmfile

DESCRIPTION

dbmstore stores key/value pairs in dbm databases. In the simple invocation

	dbmstore dbmfile key value
the given value is stored under the key key in the dbm file dbmfile, which is created if necessary. (It is permissible for value to contain whitespace; as entered on the command line it may be quoted or not, with the quotes being mandatory only if precise control is required over which whitespace characters the value contains.)

In the second form

dbmstore -f inputfile dbmfile
the key(s) and value(s) are read from the given inputfile. The first word on each line in the input file is the key, the remainder (separated from the key by arbitrary whitespace) is the value. The input file may contain multiple lines, meaning that multiple data nodes will be stored. The inputfile may also be given as -, meaning that the keys and values will be read from the standard input.

There are a few other option flags:

-b
Data value being stored is arbitrary binary data.
-i
Insert only; refuse to replace existing data under the same key.
-ml
Multiline: when reading from an input file (using -f), if an input line begins with a tab character, consider it a continuation of the preceding line; append the line (without the leading tab, but separated by a newline character) to the preceding line's value, making it a multiline value.
-n
Append a null (`\0') character to both the key and value while storing.
-nl
If the value does not end in a newline character, append one.
-r
Replace only; refuse to insert data unless the key already exists in the database.
-x
Hex mode: the data value(s) as entered are assumed to consist of hexadecimal strings, which are converted to binary data before being stored in the dbm file.
-version
Print program's version number.
-?, -h
Print a brief usage summary / help message.

The input-file reading mode is suitable for use in conjunction with dbmdump, for reconstructing or otherwise copying dbm files. Furthermore, if the -ml option flag is used with both dbmdump and dbmstore, multiline nodes can be copied as well. (Furthermore, if the -x option flag is used with both dbmdump and dbmstore, binary data can be copied as well.)

HISTORY

This documentation corresponds to version 2.3 of the dbmtools package.

See http://www.eskimo.com/~scs/src/#dbmtools for possible updates.

SEE ALSO

dbmfetch, dbmdump, dbmdelete, dbmutil
dbm(3), ndbm(3), gdbm(3)

AUTHOR

Steve Summit, scs@eskimo.com