DBMEDIT(8)

NAME
dbmedit - edit the pp database file

SYNOPSIS
dbmedit [-v] [-d database] [cmd ...]

DESCRIPTION
Dbmedit is a program to manually edit the dbm(3) database used by PP. It is intended to be used by the system maintainer for quick and simple changes to the database. It can also be used by careful setuid programs to make controlled changes on behalf of users. For example, a forwardmail command might use dbmedit to change a user's entry in the dbm database after changing the mail forwarding alias file.

The -v option may be used to get a verbose description of the program's activities.

The -d option may be used to specify an alternate database. The default is given in the PP tailor file.

If no arguments are given to dbmedit then the program goes into an interactive mode, and prompts the user for each command. Otherwise the arguments are taken as one command.

Commands in dbmedit refer to keys, tables, and values. Tables are hashed into the database using dbmbuild(8). The keys appear on the LHS of the tables and the values on the RHS. In general, only the first occurence of a value for a given key/table pair is significant. For example, the table entries:
table1:
	key1: val1
	key2: val2
table2:
	key1: val3
	key1: val4
get hashed into the following database entries:
key1  table1  val1
key1  table2  val3
key1  table2  val4
key2  table1  val2

The command lines in interactive mode are parsed using the standard PP string-to-argument routines so the same quoting and escape conventions are used. For example, if you want double-quotes or spaces in the value, they must be escaped with a backslash or the string must be quoted (for spaces).

The commands are:

    print key [table]
        Print the value of the key/table pair. If the table is omitted, then print the value of any table entry with this key.

    add key table value
        Add a key/table entry with the given value. In verbose mode, a warning message is printed if the given key/table pair already has a value in the database.

    delete key [table [value]]
        Delete the values for the specified key. If a table is specified, delete only the values for the specified key/table pair. If a value is also specified, delete only entries for the pair with that value. It is an error to try to delete something which does not appear in the database as specified.

    change key table [oldvalue] newvalue
        Change the value of the specified key/table pair to newvalue. If oldvalue is specified, change the entry matching that value. Otherwise, change the value of the first occurence or add a new key/table pair if none already exists.

    help
        Give a brief summary of the commands

    quit
        Exit the program.

All commands may be shortened to their first character only. If the wrong number of arguments is given to a command, a ``Usage:'' message will be printed. All changes are made in real time. This program may be used while PP processes are running. There is no temporary copy of the database while editing.

FILES
ppdbm.dir	The PP database
ppdbm.pag	The PP database

SEE ALSO
dbm(3x), dbmbuild(8), dbmunbuild(8)
The PP Manual: Volume 1 - Installation and Operation