The makemap(1) program (part of sendmail's source) is useful for producing database files. It supports the ndbm(3) form of database, and the hash and btree forms of the Berkeley db(3) database (see §33.2).
switches class database
The makemap(1) program reads from its standard input
lines of text with the key preceding the value on each line.
Output is to database file.
The class is selected from
The switches are:
Allows duplicate keys. Without this switch, duplicate keys cause warnings to be printed (see §126.96.36.199).
Prevents (the default) folding of keys from upper- to lowercase (see §188.8.131.52).
Appends a null byte to all keys (see §184.108.40.206).
Prevents file from being truncated on open(2). In other words, append to, don't overwrite the file (see §220.127.116.11).
Replaces (silently) a duplicate key's value with the new value (see §18.104.22.168).
Sets verbose mode so that you can watch keys and data being added (see §22.214.171.124).