1*57718be8SEnji Cooper# $NetBSD: README,v 1.1 2011/01/07 15:05:58 pgoyette Exp $ 2*57718be8SEnji Cooper# @(#)README 8.8 (Berkeley) 7/31/94 3*57718be8SEnji Cooper 4*57718be8SEnji CooperFairly large files (the command files) are built in this directory during 5*57718be8SEnji Cooperthe test runs, and even larger files (the database files) are created in 6*57718be8SEnji Cooper"/var/tmp". If the latter directory doesn't exist, set the environmental 7*57718be8SEnji Coopervariable TMPDIR to a directory where the files can be built. 8*57718be8SEnji Cooper 9*57718be8SEnji Cooper=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 10*57718be8SEnji CooperThe script file consists of lines with an initial character which is 11*57718be8SEnji Cooperthe command for that line, or an initial character indicating a key 12*57718be8SEnji Cooperor data entry for a previous command. 13*57718be8SEnji Cooper 14*57718be8SEnji CooperLegal command characters are as follows: 15*57718be8SEnji Cooper 16*57718be8SEnji Cooperc: compare a record 17*57718be8SEnji Cooper + must be followed by [kK][dD]; the data value in the database 18*57718be8SEnji Cooper associated with the specified key is compared to the specified 19*57718be8SEnji Cooper data value. 20*57718be8SEnji Coopere: echo a string 21*57718be8SEnji Cooper + writes out the rest of the line into the output file; if the 22*57718be8SEnji Cooper last character is not a carriage-return, a newline is appended. 23*57718be8SEnji Cooperf: set the flags for the next command 24*57718be8SEnji Cooper + no value zero's the flags 25*57718be8SEnji Cooperg: do a get command 26*57718be8SEnji Cooper + must be followed by [kK] 27*57718be8SEnji Cooper + writes out the retrieved data DBT. 28*57718be8SEnji Coopero [r]: dump [reverse] 29*57718be8SEnji Cooper + dump the database out, if 'r' is set, in reverse order. 30*57718be8SEnji Cooperp: do a put command 31*57718be8SEnji Cooper + must be followed by [kK][dD] 32*57718be8SEnji Cooperr: do a del command 33*57718be8SEnji Cooper + must be followed by [kK] unless R_CURSOR flag set. 34*57718be8SEnji CooperS: sync the database 35*57718be8SEnji Coopers: do a seq command 36*57718be8SEnji Cooper + must be followed by [kK] if R_CURSOR flag set. 37*57718be8SEnji Cooper + writes out the retrieved data DBT. 38*57718be8SEnji Cooper 39*57718be8SEnji CooperLegal key/data characters are as follows: 40*57718be8SEnji Cooper 41*57718be8SEnji CooperD [file]: data file 42*57718be8SEnji Cooper + set the current data value to the contents of the file 43*57718be8SEnji Cooperd [data]: 44*57718be8SEnji Cooper + set the current key value to the contents of the line. 45*57718be8SEnji CooperK [file]: key file 46*57718be8SEnji Cooper + set the current key value to the contents of the file 47*57718be8SEnji Cooperk [data]: 48*57718be8SEnji Cooper + set the current key value to the contents of the line. 49*57718be8SEnji Cooper 50*57718be8SEnji CooperBlank lines, lines with leading white space, and lines with leading 51*57718be8SEnji Cooperhash marks (#) are ignored. 52*57718be8SEnji Cooper 53*57718be8SEnji CooperOptions to dbtest are as follows: 54*57718be8SEnji Cooper 55*57718be8SEnji Cooper -d: Set the DB_LOCK flag. 56*57718be8SEnji Cooper -f: Use the file argument as the database file. 57*57718be8SEnji Cooper -i: Use the rest of the argument to set elements in the info 58*57718be8SEnji Cooper structure. If the type is btree, then "-i cachesize=10240" 59*57718be8SEnji Cooper will set BTREEINFO.cachesize to 10240. 60*57718be8SEnji Cooper -o: The rest of the argument is the output file instead of 61*57718be8SEnji Cooper using stdout. 62*57718be8SEnji Cooper -s: Don't delete the database file before opening it, i.e. 63*57718be8SEnji Cooper use the database file from a previous run. 64*57718be8SEnji Cooper 65*57718be8SEnji CooperDbtest requires two arguments, the type of access "hash", "recno" 66*57718be8SEnji Cooperor "btree", and the script name or "-" to indicate stdin. 67