[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
20.2 gdbmtool interactive mode
After successful startup, gdbmtool
starts a loop, in which
it reads commands from the standard input, executes them and prints
the results on the standard output. If the standard input is attached
to a console, gdbmtool
runs in interactive mode, which is
indicated by its prompt:
gdbmtool> _
The utility finishes when it reads the ‘quit’ command (see below) or detects end-of-file on its standard input, whichever occurs first.
A gdbmtool
command consists of a command verb,
optionally followed by arguments, separated by any
amount of white space. A command verb can be entered either in full
or in an abbreviated form, as long as that abbreviation does not match
any other verb. For example, ‘co’ can be used instead of
‘count’ and ‘ca’ instead of ‘cache’.
Any sequence of non-whitespace characters appearing after the command verb forms an argument. If the argument contains whitespace or unprintable characters it must be enclosed in double quotes. Within double quotes the usual escape sequences are understood, as shown in the table below:
Sequence | Replaced with |
\a | Audible bell character (ASCII 7) |
\b | Backspace character (ASCII 8) |
\f | Form-feed character (ASCII 12) |
\n | Newline character (ASCII 10) |
\r | Carriage return character (ASCII 13) |
\t | Horizontal tabulation character (ASCII 9) |
\v | Vertical tabulation character (ASCII 11) |
\\ | Single slash |
\" | Double quote |
Table 20.1: Backslash escapes
In addition, a backslash immediately followed by the end-of-line character effectively removes that character, allowing to split long arguments over several input lines.
Command parameters may be optional or mandatory. If the number of
actual arguments is less than the number of mandatory parameters,
gdbmtool
will prompt you to supply missing arguments. For
example, the ‘store’ command takes two mandatory parameters, so
if you invoked it with no arguments, you would be prompted twice to
supply the necessary data, as shown in example below:
gdbmtool> store key? three data? 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 gdbmtool
will report an
error and exit immediately.
20.2.1 Shell Variables | shell variables. | |
20.2.2 Gdbmtool Commands | shell commands. | |
20.2.3 Data Definitions | how to define structured data. | |
20.2.4 Startup Files |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on January 24, 2014 using texi2html 5.0.