README revision 256281
1198090Srdivacky# @(#)README 8.8 (Berkeley) 7/31/94 2198090Srdivacky 3198090SrdivackyTo build this portably, try something like: 4198090Srdivacky 5198090Srdivacky make PORTDIR="../PORT/MACH" 6198090Srdivacky 7198090Srdivackywhere MACH is the machine, i.e. "sunos.4.1.1". 8198090Srdivacky 9198090SrdivackyTo run the tests, enter "sh run.test". If your system dictionary isn't 10198090Srdivackyin /usr/share/dict/words, edit run.test to reflect the correct place. 11198090Srdivacky 12198090SrdivackyFairly large files (the command files) are built in this directory during 13198090Srdivackythe test runs, and even larger files (the database files) are created in 14198090Srdivacky"/var/tmp". If the latter directory doesn't exist, set the environmental 15198090Srdivackyvariable TMPDIR to a directory where the files can be built. 16221345Sdim 17221345Sdim=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 18221345SdimThe script file consists of lines with an initial character which is 19218893Sdimthe command for that line, or an initial character indicating a key 20221345Sdimor data entry for a previous command. 21198090Srdivacky 22198090SrdivackyLegal command characters are as follows: 23198090Srdivacky 24198090Srdivackyc: compare a record 25198090Srdivacky + must be followed by [kK][dD]; the data value in the database 26224145Sdim associated with the specified key is compared to the specified 27249423Sdim data value. 28249423Sdime: echo a string 29224145Sdim + writes out the rest of the line into the output file; if the 30224145Sdim last character is not a carriage-return, a newline is appended. 31202878Srdivackyf: set the flags for the next command 32202878Srdivacky + no value zero's the flags 33208599Srdivackyg: do a get command 34202878Srdivacky + must be followed by [kK] 35218893Sdim + writes out the retrieved data DBT. 36198090Srdivackyo [r]: dump [reverse] 37263508Sdim + dump the database out, if 'r' is set, in reverse order. 38263508Sdimp: do a put command 39221345Sdim + must be followed by [kK][dD] 40203954Srdivackyr: do a del command 41198090Srdivacky + must be followed by [kK] unless R_CURSOR flag set. 42218893SdimS: sync the database 43249423Sdims: do a seq command 44198090Srdivacky + must be followed by [kK] if R_CURSOR flag set. 45198090Srdivacky + writes out the retrieved data DBT. 46198090Srdivacky 47198090SrdivackyLegal key/data characters are as follows: 48198090Srdivacky 49226633SdimD [file]: data file 50226633Sdim + set the current data value to the contents of the file 51226633Sdimd [data]: 52198090Srdivacky + set the current key value to the contents of the line. 53263508SdimK [file]: key file 54239462Sdim + set the current key value to the contents of the file 55198090Srdivackyk [data]: 56198090Srdivacky + set the current key value to the contents of the line. 57198090Srdivacky 58198090SrdivackyBlank lines, lines with leading white space, and lines with leading 59198090Srdivackyhash marks (#) are ignored. 60198090Srdivacky 61198090SrdivackyOptions to dbtest are as follows: 62198090Srdivacky 63198090Srdivacky -d: Set the DB_LOCK flag. 64198090Srdivacky -f: Use the file argument as the database file. 65198090Srdivacky -i: Use the rest of the argument to set elements in the info 66198090Srdivacky structure. If the type is btree, then "-i cachesize=10240" 67234353Sdim will set BTREEINFO.cachesize to 10240. 68203954Srdivacky -o: The rest of the argument is the output file instead of 69198090Srdivacky using stdout. 70203954Srdivacky -s: Don't delete the database file before opening it, i.e. 71218893Sdim use the database file from a previous run. 72203954Srdivacky 73243830SdimDbtest requires two arguments, the type of access "hash", "recno" 74198090Srdivackyor "btree", and the script name or "-" to indicate stdin. 75198090Srdivacky