summaryrefslogtreecommitdiffabout
path: root/doc/gdbm.texinfo
Side-by-side diff
Diffstat (limited to 'doc/gdbm.texinfo') (more/less context) (ignore whitespace changes)
-rw-r--r--doc/gdbm.texinfo134
1 files changed, 65 insertions, 69 deletions
diff --git a/doc/gdbm.texinfo b/doc/gdbm.texinfo
index 9f0af5b..17f47f9 100644
--- a/doc/gdbm.texinfo
+++ b/doc/gdbm.texinfo
@@ -120,3 +120,3 @@ Programs
-* testgdbm:: Test and modify a GDBM database.
+* gdbmtool:: Examine and modify a GDBM database.
* gdbm_dump:: Dump the database into a flat file.
@@ -1619,10 +1619,10 @@ never free it.
-@node testgdbm
-@chapter Test and modify a GDBM database.
-@prindex testgdbm
+@node gdbmtool
+@chapter Examine and modify a GDBM database.
+@prindex gdbmtool
-The @command{testgdbm} utility allows you to view and modify an
+The @command{gdbmtool} utility allows you to view and modify an
existing @acronym{GDBM} database or to create a new one.
-@cindex default database, @command{testgdbm}
+@cindex default database, @command{gdbmtool}
@flindex junk.gdbm
@@ -1631,11 +1631,11 @@ When invoked without arguments, it tries to open a database file called
change this default by supplying the name of the database to use as
-the only argument to @command{testgdbm}, e.g.:
+the only argument to @command{gdbmtool}, e.g.:
@example
-$ testgdbm file.db
+$ gdbmtool file.db
@end example
-@cindex read-only mode, @command{testgdbm}
-@cindex @option{-r}, @command{testgdbm} option
-@cindex @option{--read-only}, @command{testgdbm} option
+@cindex read-only mode, @command{gdbmtool}
+@cindex @option{-r}, @command{gdbmtool} option
+@cindex @option{--read-only}, @command{gdbmtool} option
The database will be opened in read-write mode, unless the
@@ -1644,6 +1644,6 @@ it will be opened only for reading.
-@cindex creating a database, @command{testgdbm}
-@cindex @option{-n}, @command{testgdbm} option
-@cindex @option{--newdb}, @command{testgdbm} option
-If the database does not exist, @command{testgdbm} will create it.
+@cindex creating a database, @command{gdbmtool}
+@cindex @option{-n}, @command{gdbmtool} option
+@cindex @option{--newdb}, @command{gdbmtool} option
+If the database does not exist, @command{gdbmtool} will create it.
There is a special option @option{-n} (@option{--newdb}, which
@@ -1658,6 +1658,6 @@ the database already exists, it will be deleted, so use it sparingly.
@node invocation
-@section testgdbm invocation
-@cindex command line options, @command{testgdbm}
+@section gdbmtool invocation
+@cindex command line options, @command{gdbmtool}
-The following table summarizes all @command{testgdbm} command line
+The following table summarizes all @command{gdbmtool} command line
options:
@@ -1683,2 +1683,5 @@ Disable file locking.
Disable mmap.
+@item -q
+@itemx --quiet
+Don't print the usual welcome banner at startup.
@item -r
@@ -1698,9 +1701,9 @@ command line options.
@node shell
-@section testgdbm interactive mode
-@cindex interactive mode, @command{testgdbm}
+@section gdbmtool interactive mode
+@cindex interactive mode, @command{gdbmtool}
-After successful startup, @command{testgdbm} starts a loop, in which
+After successful startup, @command{gdbmtool} starts a loop, in which
it reads commands from the user, executes them and prints the results
on the standard output. If the standard input is attached to a console,
-@command{testgdbm} runs in interactive mode, which is indicated by its
+@command{gdbmtool} runs in interactive mode, which is indicated by its
@dfn{prompt}:
@@ -1708,3 +1711,3 @@ on the standard output. If the standard input is attached to a console,
@example
-testgdbm> _
+gdbmtool> _
@end example
@@ -1714,3 +1717,3 @@ detects end-of-file on its standard input, whichever occurs first.
-A @command{testgdbm} command consists of a @dfn{command verb},
+A @command{gdbmtool} command consists of a @dfn{command verb},
optionally followed by one or two @dfn{arguments}, separated by any
@@ -1729,3 +1732,3 @@ Each command takes at most two @dfn{formal parameters}, which can be
optional or mandatory. If the number of actual arguments is less than the
-number of mandatory parameters, @command{testgdbm} will prompt you to
+number of mandatory parameters, @command{gdbmtool} will prompt you to
supply missing arguments. For example, the @samp{store} command takes two
@@ -1736,3 +1739,3 @@ example below:
@example
-testgdbm> @kbd{store}
+gdbmtool> @kbd{store}
key> @kbd{three}
@@ -1743,3 +1746,3 @@ However, such prompting is possible only in interactive mode. In
non-interactive mode (e.g.@: when running a script), all arguments must
-be supplied with each command, otherwise @command{testgdbm} will report an
+be supplied with each command, otherwise @command{gdbmtool} will report an
error and exit immediately.
@@ -1747,6 +1750,6 @@ error and exit immediately.
@anchor{pager}
-@cindex pager, @command{testgdbm}
+@cindex pager, @command{gdbmtool}
@cindex @env{PAGER}
Some commands produce excessive amounts of output. To help you follow
-it, @command{testgdbm} uses a pager utility to display such
+it, @command{gdbmtool} uses a pager utility to display such
output. The name of the pager utility is taken from the environment
@@ -1757,3 +1760,3 @@ number of lines on your screen.
@anchor{nul-termination}
-Many of the @command{testgdbm} commands operate on database key and
+Many of the @command{gdbmtool} commands operate on database key and
data values. The utility assumes that both keys and data are
@@ -1767,3 +1770,2 @@ The following table summarizes all available commands:
@deffn {command verb} count
-@deffnx {command abbrev} co
@deffnx {command letter} c
@@ -1773,16 +1775,15 @@ Print the number of entries in the database.
@deffn {command verb} delete @var{key}
-@deffnx {command abbrev} de @var{key}
@deffnx {command letter} d @var{key}
-Delete entry with a given @var{key}
+Delete entry with the given @var{key}
@end deffn
-@anchor{testgdbm export}
+@anchor{gdbmtool export}
@deffn {command verb} export @var{file-name} [truncate] [binary|ascii]
-@deffnx {command abbrev} e @var{file-name} [truncate] [binary|ascii]
+@deffnx {command letter} e @var{file-name} [truncate] [binary|ascii]
Export the database to the flat file @var{file-name}. @xref{Flat files},
for a description of the flat file format and its purposes. This
-command will not overwrite an existing file, unless the argument
-@samp{truncate} is also given. Another optional argument determines
-the type of dump (@pxref{Flat files}). By default, ASCII dump is
-created.
+command will not overwrite an existing file, unless the
+@samp{truncate} parameter is also given. Another optional argument
+determines the type of the dump (@pxref{Flat files}). By default, ASCII
+dump is created.
@@ -1792,10 +1793,9 @@ See also @ref{gdbmexport}.
@deffn {command verb} fetch @var{key}
-@deffnx {command abbrev} fe @var{key}
@deffnx {command letter} f @var{key}
-Fetch and display a record with the given @var{key}.
+Fetch and display the record with the given @var{key}.
@end deffn
-@anchor{testgdbm import}
+@anchor{gdbmtool import}
@deffn {command verb} import @var{file-name} [replace] [nometa]
-@deffnx {command abbrev} i @var{file-name} [replace] [nometa]
+@deffnx {command letter} i @var{file-name} [replace] [nometa]
Import data from a flat dump file @var{file-name}
@@ -1808,3 +1808,3 @@ restoring meta-information from the dump file.
@deffn {command verb} list
-@deffnx {command abbrev} l
+@deffnx {command letter} l
List the contents of the database (@pxref{pager}).
@@ -1813,7 +1813,5 @@ List the contents of the database (@pxref{pager}).
@deffn {command verb} next [@var{key}]
-@deffnx {command abbrev} n [@var{key}]
-Sequential access: fetch and display a next record. If @var{key} is
-given, a record following one with this key will be fetched.
-Otherwise, the key supplied by the latest @code{1}, @code{2} or
-@var{n} command will be used.
+@deffnx {command letter} n [@var{key}]
+Sequential access: fetch and display the next record. If the @var{key} is
+given, the record following the one with this key will be fetched.
@@ -1824,4 +1822,17 @@ See also @code{first}, below.
+@deffn {command verb} prompt @var{text}
+Changes the command prompt to the string @var{text}. The string can
+contain @dfn{escape sequences}, the special entities consisting of the
+@samp{%} character followed by another character. These sequences are
+replaced in the generated prompt as follows:
+
+@multitable @columnfractions 0.4 0.5
+@headitem Sequence @tab Expansion
+@item %f @tab name of the db file
+@item %% @tab %
+@end multitable
+@end deffn
+
@deffn {command verb} quit
-@deffnx {command abbrev} q
+@deffnx {command letter} q
Close the database and quit the utility.
@@ -1830,3 +1841,2 @@ Close the database and quit the utility.
@deffn {command verb} store @var{key} @var{data}
-@deffnx {command abbrev} sto @var{key} @var{data}
@deffnx {command letter} s @var{key} @var{data}
@@ -1837,6 +1847,5 @@ already exists, its data will be replaced.
@deffn {command verb} first
-@deffnx {command abbrev} fi
@deffnx {command letter} 1
Fetch and display the first record in the database. Subsequent
-records can be fetched using @code{next} command (see above).
+records can be fetched using the @code{next} command (see above).
@xref{Sequential}, for more information on sequential access.
@@ -1845,7 +1854,6 @@ records can be fetched using @code{next} command (see above).
@deffn {command verb} read @var{file} [replace]
-@deffnx {command abbrev} rea @var{file} [replace]
@deffnx {command letter} < @var{file} [replace]
Read entries from @var{file} and store them in the database. If the
-word @samp{replace} is given as the second argument, any existing
-records with matching keys will be replaced.
+@samp{replace} parameter is given, any existing records with matching
+keys will be replaced.
@end deffn
@@ -1853,3 +1861,2 @@ records with matching keys will be replaced.
@deffn {command verb} reorganize
-@deffnx {command abbrev} reo
@deffnx {command letter} r
@@ -1859,3 +1866,2 @@ Reorganize the database (@pxref{Reorganization}).
@deffn {command verb} key-zero
-@deffnx {command abbrev} k
@deffnx {command letter} z
@@ -1866,3 +1872,2 @@ state. @xref{nul-termination}.
@deffn {command verb} avail
-@deffnx {command abbrev} a
@deffnx {command letter} A
@@ -1872,3 +1877,2 @@ Print the @dfn{avail list}.
@deffn {command verb} bucket
-@deffnx {command abbrev} b
@deffnx {command letter} B
@@ -1878,3 +1882,2 @@ Print the bucket number @var{num}.
@deffn {command verb} current
-@deffnx {command abbrev} cu
@deffnx {command letter} C
@@ -1884,3 +1887,2 @@ Print the current bucket.
@deffn {command verb} dir
-@deffnx {command abbrev} di
@deffnx {command letter} D
@@ -1890,3 +1892,2 @@ Print hash directory.
@deffn {command verb} header
-@deffnx {command abbrev} hea
@deffnx {command letter} F
@@ -1896,3 +1897,2 @@ Print file header.
@deffn {command verb} hash @var{key}
-@deffnx {command abbrev} ha @var{key}
@deffnx {command letter} H @var{key}
@@ -1902,3 +1902,2 @@ Compute and display the hash value for the given @var{key}.
@deffn {command verb} cache
-@deffnx {command abbrev} ca
@deffnx {command letter} K
@@ -1908,3 +1907,2 @@ Print the bucket cache.
@deffn {command verb} status
-@deffnx {command abbrev} sta
@deffnx {command letter} S
@@ -1921,3 +1919,3 @@ Zero terminated data: yes
@deffn {command verb} version
-@deffnx {command abbrev} v
+@deffnx {command letter} v
Print the version of @command{gdbm}.
@@ -1926,3 +1924,2 @@ Print the version of @command{gdbm}.
@deffn {command verb} data-zero
-@deffnx {command abbrev} da
@deffnx {command letter} Z
@@ -1935,3 +1932,2 @@ status.
@deffn {command verb} help
-@deffnx {command abbrev} hel
@deffnx {command letter} ?

Return to:

Send suggestions and report system problems to the System administrator.