1# @(#)README 8.2 (Berkeley) 2/21/94
| 1# @(#)README 8.8 (Berkeley) 7/31/94
|
2 3To build this portably, try something like: 4
| 2 3To build this portably, try something like: 4
|
5 make INC="-I../PORT/MACH/ -I../PORT/MACH/include" LIB=../PORT/MACH/libdb.a
| 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
| 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
|
12=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| 17=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
13The script file consists of lines with a initial character which is 14the "command" for that line. Legal characters are as follows:
| 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.
|
15
| 21
|
| 22Legal command characters are as follows: 23
|
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.
| 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
|
23g: do a get command 24 + must be followed by [kK] 25 + writes out the retrieved data DBT.
| 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.
|
26p: do a put command 27 + must be followed by [kK][dD] 28r: do a del command
| 38p: do a put command 39 + must be followed by [kK][dD] 40r: do a del command
|
29 + must be followed by [kK]
| 41 + must be followed by [kK] unless R_CURSOR flag set. 42S: sync the database
|
30s: do a seq command
| 43s: do a seq command
|
| 44 + must be followed by [kK] if R_CURSOR flag set.
|
31 + writes out the retrieved data DBT.
| 45 + writes out the retrieved data DBT.
|
32f: set the flags for the next command 33 + no value zero's the flags
| 46 47Legal key/data characters are as follows: 48
|
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.
| 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.
|
42o [r]: dump [reverse] 43 + dump the database out, if 'r' is set, in reverse order.
| |
44
| 57
|
| 58Blank lines, lines with leading white space, and lines with leading 59hash marks (#) are ignored. 60
|
45Options to dbtest are as follows: 46
| 61Options to dbtest are as follows: 62
|
| 63 -d: Set the DB_LOCK flag.
|
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.
| 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.
|
53
| 72
|
54Dbtest requires two arguments, the type of access "hash", "recno" or 55"btree", and the script name.
| 73Dbtest requires two arguments, the type of access "hash", "recno" 74or "btree", and the script name or "-" to indicate stdin.
|
| |