1*7f2fe78bSCy Schubert# @(#)README 8.8 (Berkeley) 7/31/94 2*7f2fe78bSCy Schubert 3*7f2fe78bSCy SchubertTo build this portably, try something like: 4*7f2fe78bSCy Schubert 5*7f2fe78bSCy Schubert make PORTDIR="../PORT/MACH" 6*7f2fe78bSCy Schubert 7*7f2fe78bSCy Schubertwhere MACH is the machine, i.e. "sunos.4.1.1". 8*7f2fe78bSCy Schubert 9*7f2fe78bSCy SchubertTo run the tests, enter "sh run.test". If your system dictionary isn't 10*7f2fe78bSCy Schubertin /usr/share/dict/words, edit run.test to reflect the correct place. 11*7f2fe78bSCy Schubert 12*7f2fe78bSCy SchubertFairly large files (the command files) are built in this directory during 13*7f2fe78bSCy Schubertthe test runs, and even larger files (the database files) are created in 14*7f2fe78bSCy Schubert"/var/tmp". If the latter directory doesn't exist, set the environmental 15*7f2fe78bSCy Schubertvariable TMPDIR to a directory where the files can be built. 16*7f2fe78bSCy Schubert 17*7f2fe78bSCy Schubert=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 18*7f2fe78bSCy SchubertThe script file consists of lines with an initial character which is 19*7f2fe78bSCy Schubertthe command for that line, or an initial character indicating a key 20*7f2fe78bSCy Schubertor data entry for a previous command. 21*7f2fe78bSCy Schubert 22*7f2fe78bSCy SchubertLegal command characters are as follows: 23*7f2fe78bSCy Schubert 24*7f2fe78bSCy Schubertc: compare a record 25*7f2fe78bSCy Schubert + must be followed by [kK][dD]; the data value in the database 26*7f2fe78bSCy Schubert associated with the specified key is compared to the specified 27*7f2fe78bSCy Schubert data value. 28*7f2fe78bSCy Schuberte: echo a string 29*7f2fe78bSCy Schubert + writes out the rest of the line into the output file; if the 30*7f2fe78bSCy Schubert last character is not a carriage-return, a newline is appended. 31*7f2fe78bSCy Schubertf: set the flags for the next command 32*7f2fe78bSCy Schubert + no value zero's the flags 33*7f2fe78bSCy Schubertg: do a get command 34*7f2fe78bSCy Schubert + must be followed by [kK] 35*7f2fe78bSCy Schubert + writes out the retrieved data DBT. 36*7f2fe78bSCy Schuberto [r]: dump [reverse] 37*7f2fe78bSCy Schubert + dump the database out, if 'r' is set, in reverse order. 38*7f2fe78bSCy Schubertp: do a put command 39*7f2fe78bSCy Schubert + must be followed by [kK][dD] 40*7f2fe78bSCy Schubertr: do a del command 41*7f2fe78bSCy Schubert + must be followed by [kK] unless R_CURSOR flag set. 42*7f2fe78bSCy SchubertS: sync the database 43*7f2fe78bSCy Schuberts: do a seq command 44*7f2fe78bSCy Schubert + must be followed by [kK] if R_CURSOR flag set. 45*7f2fe78bSCy Schubert + writes out the retrieved data DBT. 46*7f2fe78bSCy Schubert 47*7f2fe78bSCy SchubertLegal key/data characters are as follows: 48*7f2fe78bSCy Schubert 49*7f2fe78bSCy SchubertD [file]: data file 50*7f2fe78bSCy Schubert + set the current data value to the contents of the file 51*7f2fe78bSCy Schubertd [data]: 52*7f2fe78bSCy Schubert + set the current key value to the contents of the line. 53*7f2fe78bSCy SchubertK [file]: key file 54*7f2fe78bSCy Schubert + set the current key value to the contents of the file 55*7f2fe78bSCy Schubertk [data]: 56*7f2fe78bSCy Schubert + set the current key value to the contents of the line. 57*7f2fe78bSCy Schubert 58*7f2fe78bSCy SchubertBlank lines, lines with leading white space, and lines with leading 59*7f2fe78bSCy Schuberthash marks (#) are ignored. 60*7f2fe78bSCy Schubert 61*7f2fe78bSCy SchubertOptions to dbtest are as follows: 62*7f2fe78bSCy Schubert 63*7f2fe78bSCy Schubert -d: Set the DB_LOCK flag. 64*7f2fe78bSCy Schubert -f: Use the file argument as the database file. 65*7f2fe78bSCy Schubert -i: Use the rest of the argument to set elements in the info 66*7f2fe78bSCy Schubert structure. If the type is btree, then "-i cachesize=10240" 67*7f2fe78bSCy Schubert will set BTREEINFO.cachesize to 10240. 68*7f2fe78bSCy Schubert -o: The rest of the argument is the output file instead of 69*7f2fe78bSCy Schubert using stdout. 70*7f2fe78bSCy Schubert -s: Don't delete the database file before opening it, i.e. 71*7f2fe78bSCy Schubert use the database file from a previous run. 72*7f2fe78bSCy Schubert 73*7f2fe78bSCy SchubertDbtest requires two arguments, the type of access "hash", "recno" 74*7f2fe78bSCy Schubertor "btree", and the script name or "-" to indicate stdin. 75