114272Spst#	@(#)README	8.8 (Berkeley) 7/31/94
21573Srgrimes
31573SrgrimesTo build this portably, try something like:
41573Srgrimes
514272Spst    make PORTDIR="../PORT/MACH"
61573Srgrimes
71573Srgrimeswhere MACH is the machine, i.e. "sunos.4.1.1".
81573Srgrimes
91573SrgrimesTo run the tests, enter "sh run.test".  If your system dictionary isn't
101573Srgrimesin /usr/share/dict/words, edit run.test to reflect the correct place.
111573Srgrimes
1214272SpstFairly large files (the command files) are built in this directory during
1314272Spstthe test runs, and even larger files (the database files) are created in
1414272Spst"/var/tmp".  If the latter directory doesn't exist, set the environmental
1514272Spstvariable TMPDIR to a directory where the files can be built.
1614272Spst
171573Srgrimes=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1814272SpstThe script file consists of lines with an initial character which is
1914272Spstthe command for that line, or an initial character indicating a key
2014272Spstor data entry for a previous command.
211573Srgrimes
2214272SpstLegal command characters are as follows:
2314272Spst
241573Srgrimesc: compare a record
251573Srgrimes	+ must be followed by [kK][dD]; the data value in the database
261573Srgrimes	  associated with the specified key is compared to the specified
271573Srgrimes	  data value.
281573Srgrimese: echo a string
291573Srgrimes	+ writes out the rest of the line into the output file; if the
301573Srgrimes	  last character is not a carriage-return, a newline is appended.
3114272Spstf: set the flags for the next command
3214272Spst	+ no value zero's the flags
331573Srgrimesg: do a get command
341573Srgrimes	+ must be followed by [kK]
351573Srgrimes	+ writes out the retrieved data DBT.
3614272Spsto [r]: dump [reverse]
3714272Spst	+ dump the database out, if 'r' is set, in reverse order.
381573Srgrimesp: do a put command
391573Srgrimes	+ must be followed by [kK][dD]
401573Srgrimesr: do a del command
4114272Spst	+ must be followed by [kK] unless R_CURSOR flag set.
4214272SpstS: sync the database
431573Srgrimess: do a seq command
4414272Spst	+ must be followed by [kK] if R_CURSOR flag set.
451573Srgrimes	+ writes out the retrieved data DBT.
4614272Spst
4714272SpstLegal key/data characters are as follows:
4814272Spst
491573SrgrimesD [file]: data file
501573Srgrimes	+ set the current data value to the contents of the file
511573Srgrimesd [data]:
521573Srgrimes	+ set the current key value to the contents of the line.
531573SrgrimesK [file]: key file
541573Srgrimes	+ set the current key value to the contents of the file
551573Srgrimesk [data]:
561573Srgrimes	+ set the current key value to the contents of the line.
571573Srgrimes
5814272SpstBlank lines, lines with leading white space, and lines with leading
5914272Spsthash marks (#) are ignored.
6014272Spst
611573SrgrimesOptions to dbtest are as follows:
621573Srgrimes
6314272Spst	-d: Set the DB_LOCK flag.
641573Srgrimes	-f: Use the file argument as the database file.
651573Srgrimes	-i: Use the rest of the argument to set elements in the info
661573Srgrimes	    structure.  If the type is btree, then "-i cachesize=10240"
671573Srgrimes	    will set BTREEINFO.cachesize to 10240.
681573Srgrimes	-o: The rest of the argument is the output file instead of
691573Srgrimes	    using stdout.
7014272Spst	-s: Don't delete the database file before opening it, i.e.
7114272Spst	    use the database file from a previous run.
721573Srgrimes
7314272SpstDbtest requires two arguments, the type of access "hash", "recno"
7414272Spstor "btree", and the script name or "-" to indicate stdin.
75