dbe(1)

NAME
dbe - Edit an sdbm(3) database

USAGE
dbe -a | -c | -d | -f | -F | -s database [ -m r | w | rw ] [ -bikortvxXy ] [ key [ content ]]

DESCRIPTION
dbe operates on sdbm(3) databases. It can be used to create them, look at them or change them. When specifying the value of a key or the content of its associated entry, \nnn, \0, \n, \t, \f and \r are interpreted as usual. When displaying key/content pairs, non-printable characters are displayed using the \nnn notation.

It is possible to use hexadecimal representation for keys and content, with -x and -y respectively, or force binary output of content with the -b switch.

Content can be supplied via a file with -i or output to a file with -o by interpreting the content argument as a filename when either of these options are present.

OPTIONS

-a  List all entries in the database as "key: value".

-b  Content given / output as binary (no interpretation).

-c  Create the database if it does not exist.

-d  Delete the entry associated with the specified key.

-f  Fetch and display the entry associated with the specified key.

-F  Fetch and display all the entries whose key match the specified regular-expression

-i  Input from file: content is interpreted as a filename containing the actual content.

-k  Print only the keys for -a and -F scans.

-m r|w|rw
    Open the database in read-only, write-only or read-write mode

-o  Output to file: content is interpreted as a filename where the actual content of the key is written.

-r  Replace the entry associated with the specified key if it already exists. See option -s.

-s  Store an entry under a specific key. An error occurs if the key already exists and the option -r was not specified.

-t  Re-initialize the database before executing the command.

-v  Verbose mode. Confirm stores and deletions.

-x  Keys are interpreted as hexadecimal. Displayed keys are shown in hexadecimal, regardless of whether they are printable.

-X  If option -X is used with option -c, then if the database already exists, an error occurs. This can be used to implement a simple exclusive access locking mechanism.

-y  Content is interpreted as hexadecimal. Displayed values are shown in hexadecimal, regardless of whether they are printable.

SEE ALSO
sdbm(3)

AUTHOR
janick@bnr.ca

Adapted for gtk-gnutella to use SDBM by Raphael.Manfredi@pobox.com.