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 §22.214.171.124).
Prevents (the default) folding of keys from upper- to lowercase (see §126.96.36.199).
Appends a null byte to all keys (see §188.8.131.52).
Prevents file from being truncated on open(2). In other words, append to, don't overwrite the file (see §184.108.40.206).
Replaces (silently) a duplicate key's value with the new value (see §220.127.116.11).
Sets verbose mode so that you can watch keys and data being added (see §18.104.22.168).