1# @(#)README 8.8 (Berkeley) 7/31/94 |
2 3To build this portably, try something like: 4 |
5 make PORTDIR="../PORT/MACH" |
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 |
12Fairly large files (the command files) are built in this directory during 13the test runs, and even larger files (the database files) are created in 14"/var/tmp". If the latter directory doesn't exist, set the environmental 15variable TMPDIR to a directory where the files can be built. 16 |
17=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
18The script file consists of lines with an initial character which is 19the command for that line, or an initial character indicating a key 20or data entry for a previous command. |
21 |
22Legal command characters are as follows: 23 |
24c: compare a record 25 + must be followed by [kK][dD]; the data value in the database 26 associated with the specified key is compared to the specified 27 data value. 28e: echo a string 29 + writes out the rest of the line into the output file; if the 30 last character is not a carriage-return, a newline is appended. |
31f: set the flags for the next command 32 + no value zero's the flags |
33g: do a get command 34 + must be followed by [kK] 35 + writes out the retrieved data DBT. |
36o [r]: dump [reverse] 37 + dump the database out, if 'r' is set, in reverse order. |
38p: do a put command 39 + must be followed by [kK][dD] 40r: do a del command |
41 + must be followed by [kK] unless R_CURSOR flag set. 42S: sync the database |
43s: do a seq command |
44 + must be followed by [kK] if R_CURSOR flag set. |
45 + writes out the retrieved data DBT. |
46 47Legal key/data characters are as follows: 48 |
49D [file]: data file 50 + set the current data value to the contents of the file 51d [data]: 52 + set the current key value to the contents of the line. 53K [file]: key file 54 + set the current key value to the contents of the file 55k [data]: 56 + set the current key value to the contents of the line. |
57 |
58Blank lines, lines with leading white space, and lines with leading 59hash marks (#) are ignored. 60 |
61Options to dbtest are as follows: 62 |
63 -d: Set the DB_LOCK flag. |
64 -f: Use the file argument as the database file. 65 -i: Use the rest of the argument to set elements in the info 66 structure. If the type is btree, then "-i cachesize=10240" 67 will set BTREEINFO.cachesize to 10240. 68 -o: The rest of the argument is the output file instead of 69 using stdout. |
70 -s: Don't delete the database file before opening it, i.e. 71 use the database file from a previous run. |
72 |
73Dbtest requires two arguments, the type of access "hash", "recno" 74or "btree", and the script name or "-" to indicate stdin. |