1# @(#)README 8.2 (Berkeley) 02/21/94 2 3To build this portably, try something like: 4 5 make INC="-I../PORT/MACH/ -I../PORT/MACH/include" LIB=../PORT/MACH/libdb.a 6 7where MACH is the machine, i.e. "sunos.4.1.1". 8 9To run the tests, enter "sh run.test". If your system dictionary isn't 10in /usr/share/dict/words, edit run.test to reflect the correct place. 11 12=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 13The script file consists of lines with a initial character which is 14the "command" for that line. Legal characters are as follows: 15 16c: compare a record 17 + must be followed by [kK][dD]; the data value in the database 18 associated with the specified key is compared to the specified 19 data value. 20e: echo a string 21 + writes out the rest of the line into the output file; if the 22 last character is not a carriage-return, a newline is appended. 23g: do a get command 24 + must be followed by [kK] 25 + writes out the retrieved data DBT. 26p: do a put command 27 + must be followed by [kK][dD] 28r: do a del command 29 + must be followed by [kK] 30s: do a seq command 31 + writes out the retrieved data DBT. 32f: set the flags for the next command 33 + no value zero's the flags 34D [file]: data file 35 + set the current data value to the contents of the file 36d [data]: 37 + set the current key value to the contents of the line. 38K [file]: key file 39 + set the current key value to the contents of the file 40k [data]: 41 + set the current key value to the contents of the line. 42o [r]: dump [reverse] 43 + dump the database out, if 'r' is set, in reverse order. 44 45Options to dbtest are as follows: 46 47 -f: Use the file argument as the database file. 48 -i: Use the rest of the argument to set elements in the info 49 structure. If the type is btree, then "-i cachesize=10240" 50 will set BTREEINFO.cachesize to 10240. 51 -o: The rest of the argument is the output file instead of 52 using stdout. 53 54Dbtest requires two arguments, the type of access "hash", "recno" or 55"btree", and the script name. 56