Load flat text file into a Berkeley DB database
08/31/2010 Leave a comment
cat INPUT_FILE | sed ‘s/\\/\\\\/g’ | db_load -T -t hash DB_FILE
“-T” is requirable if input file is just flat text file instead of being from db_dump. The input file consists of two-line pairs, in which the first line in a pair is key and the second is value.

