DBM Tool 1.1 20 Nov 1999 Donald King ================================= This software is Copyright (C) 1999 by Donald L. King. However, it may be distributed and modified freely, provided that my name remains attached to any programs or products derived from it. The following files are included with the program: README This file Makefile Simple Makefile to preprocess and install dbmtool dbmtool.in The program itself (before preprocessing) DBMTool is a Perl-coded shell around the *DBM_File packages. It provides a fairly simple yet powerful set of commands which can be used to manipulate databases; this set includes both *de rigeur* commands like ADD and DEL and a few rarer but still useful commands like MERGE and DIFF, the intersect and union calculators. Installation ------------ Installation is as simple as unpacking the tarball, editing the Makefile as necessary, and typing "make install". By default, the program will be installed under /usr/local/bin with ownership root.root and permissions 0755. Perl 5 is required, >= 5.004 is recommended. The modules Term::ReadLine, Fcntl, and POSIX are required; these all come standard with Perl 5 on Unix systems, as I recall. In addition, you will also need one or more of the *DBM_File packages to do anything useful; SDBM_File comes with Perl, so that shouldn't be a problem. Interface Notes --------------- DBMTool uses Term::ReadLine, which usually means that it looks pretty and has a command history buffer. It also uses a line-parsing algorithm which follows rules similar to those in bash. With the exception of filenames, all arguments are case-blind. When one command (e.g. QUIT) has a common alternative that a user might be tempted to type (e.g. EXIT), both are provided and equivalent. Together, these rules are meant to flatten the learning curve. DBMTool has a notion of the 'current database'. The current database may be attached to a file, or it may be unattached and exist in memory only. Most commands operate on the current database; the exceptions to this are the DUMP, MERGE, and DIFF commands, which interact between the current database and another (which *must* be attached to a file). The MERGE and DIFF commands store their results back into the current database. File Formats ------------ The following file formats, and the aliases provided for them, are available to DBMTool if your system has them installed properly. DB_File [db,db1] Berkeley DB 1.x BerkeleyDB [db2] Berkeley DB 2.x GDBM_File [gdbm] GNU DBM NDBM_File [ndbm] NDBM ??? (Any historians in the audience?) ODBM_File [odbm] ODBM ??? (Ditto.) SDBM_File [sdbm] Perl DBM Commands -------- Commands are grouped into four basic categories: key level, database level, file system commands, and miscellaneous. A brief outline of each command group follows. * Key-level commands are those which act on individual keys and values within the current database. These are ADD, DEL, FIND, and LIST. * Database-level commands interact with entire databases at a time. Some of the more common ones are TIE, UNTIE, STAT, and DUMP. * File System commands are an unnecessary perk, but a pleasant one nonetheless. These simulate commands which you might type in at the shell, and are meant to aid in finding DBM files. CD, PWD, DIR/LS, and SHELL make up the set. * Miscellaneous commands don't fit in any other category. The misc. commands are HELP, TYPES, and QUIT.