Rdb: Ruby-Nachbau der MWC /rdb-Werkzeuge
This commit is contained in:
+381
@@ -0,0 +1,381 @@
|
||||
.TH ve "" "" "/rdb Command"
|
||||
.PC "Visually edit a table"
|
||||
\fBve [\fItable [\-n[\fIn\fB] \-f\fIc\fB \-m\fIc\fB \-i \-s [\fIfile\fB] \-h [\fIfile\fB] \-a [\fIfile\fB] \-v [\fIfile\fB]]][\-b]\fR
|
||||
.PP
|
||||
.II "editor^ve"
|
||||
.II "form^editor"
|
||||
.II "table^editor"
|
||||
\fBve\fR is an editor that is designed to edit tables
|
||||
in a multi-user environment.
|
||||
Because it is designed to work with tables, it understands rows and columns;
|
||||
and because it is designed for a multi-user environment, it knows how to
|
||||
lock records and perform other useful tasks to protect the integrity of
|
||||
of your data.
|
||||
.PP
|
||||
.B ve
|
||||
defines a row, or \fIrecord\fR, as containing a fixed number of columns,
|
||||
or \fIfields\fR.
|
||||
It defines a field as being a string delimited by an exclusive
|
||||
\fIcolumn separation character\fR.
|
||||
Normally, the first two rows in a \fBve\fR table are \fIheader
|
||||
records\fR that describe the columns in each row.
|
||||
Each field in the first header record names its column;
|
||||
fields in the second header record are hyphens `-'.
|
||||
When you invoke \fBve\fR
|
||||
without an argument,
|
||||
it displays a menu of on-line \fBve\fR help topics and instructions.
|
||||
.PP
|
||||
\fItable\fR is the table you wish to edit.
|
||||
When you name a
|
||||
\fItable\fR on the command line, all other arguments must follow it.
|
||||
If
|
||||
.I table
|
||||
does not exist,
|
||||
\fBve\fR create sthe necessary header records from a screen file
|
||||
or a header table.
|
||||
.SH Options
|
||||
.B ve
|
||||
recognizes the following options:
|
||||
.IP \fB\-b\fR
|
||||
Use the terminal's highlighting capability.
|
||||
If specified, \fBve\fR does its best to emphasize
|
||||
non-data text and the on-line help file's keywords by displaying them
|
||||
in high intensity.
|
||||
This may produce odd results if the entry in file
|
||||
\fB/etc/termcap\fR for your terminal is incorrect or missing,
|
||||
or if your terminal type is set incorrectly.
|
||||
.IP \fB-n\fIn\fR
|
||||
Use automatic record numbering.
|
||||
\fBve\fR assumes that the data in the first column of each record are
|
||||
unique numbers, and keeps track of the largest value in this column.
|
||||
As you add new records to the table,
|
||||
.B ve
|
||||
increments this number and stores it in the first column of the new record.
|
||||
.sp \n(pDu
|
||||
When you specify \fIn\fR, \fBve\fR begins numbering records at that value.
|
||||
For example, \fB-n2001\fR means,
|
||||
``Use automatic record numbering and begin the numbers at 2001.''
|
||||
.IP \fB-f\fIc\fR
|
||||
Use the character \fIc\fR to delimit columns
|
||||
instead of the default tab character.
|
||||
With the exception of the screen file, all files associated with
|
||||
the \fBve\fR table \fImust\fR use the same column separation
|
||||
character.
|
||||
.IP \fB-m\fIc\fR
|
||||
Invoke \fBve\fR in mode \fIc\fR, where
|
||||
.I c
|
||||
is one of the following:
|
||||
.DM
|
||||
\fBi\fR Insert mode
|
||||
\fBn\fR Next mode
|
||||
\fB/\fR Search mode
|
||||
.DE
|
||||
.sp \n(pDu
|
||||
\fBve\fR returns to this mode after each successful \fIwrite\fR.
|
||||
Invoking
|
||||
.B ve
|
||||
in insert mode is convenient when entering data.
|
||||
.IP \fB\-i\fR
|
||||
Initialize the table.
|
||||
\fBve\fR maintains a private sequential index of all records in a table,
|
||||
so it can track the records in use and the records that have been deleted
|
||||
during an editing session.
|
||||
It also uses this index to clean up the table when the edit session is over.
|
||||
If the table is modified by a program other than \fBve\fR, then you must use
|
||||
the \fB\-i\fR switch during the next \fBve\fR edit session to
|
||||
reinitialize its private index.
|
||||
You can use this index for fast searching by record number
|
||||
if each record has a number and no records are ever deleted.
|
||||
.sp \n(pDu
|
||||
If the current directory contains any files
|
||||
that follow \fBve\fR's naming convention \fBdata-\fIc\fR,
|
||||
where \fI-c\fR is a file-option switch (\fB\-s\fR, \fB\-h\fR, \fB\-a\fR,
|
||||
\fB\-v\fR),
|
||||
.B ve
|
||||
incorporates them automatically into the command line before it
|
||||
processes the argument list.
|
||||
You must name on the command line all
|
||||
files that not named according to this convention;
|
||||
please note that this overrides the inclusion of any default names
|
||||
in the command line.
|
||||
.IP "\fB-s \fIfile\fR"
|
||||
Tell \fBve\fR to use \fIfile\fR as the screen file,
|
||||
which contains a template of how you want the screen to appear.
|
||||
The entire screen file should not exceed 23 lines.
|
||||
\fBve\fR scans the screen file for column names enclosed between angle
|
||||
brackets (\fB<\^>\fR) and displays the data in those columns between the
|
||||
brackets.
|
||||
Both brackets must be on the same line.
|
||||
If
|
||||
.I file
|
||||
is used to initialize the table,
|
||||
all column names must be listed; otherwise, excluding a column name from
|
||||
a template also keeps data in those columns from being viewed,
|
||||
sought, or modified.
|
||||
If a column name is preceded by an exclamation point,
|
||||
.B ve
|
||||
lets you search for that column's data and display them,
|
||||
but no user can modify them.
|
||||
.IP "\fB-h \fIfile\fR"
|
||||
The header records are in
|
||||
.IR file .
|
||||
If no
|
||||
.I file
|
||||
is named,
|
||||
.B ve
|
||||
assumes that the header records are in file
|
||||
.BR data-h .
|
||||
\fBve\fR can create a header file only when the table
|
||||
is initialized with a screen file.
|
||||
.IP "\fB-a \fIfile\fR"
|
||||
If the audit table does not exist, tell \fBve\fR to create it and write it
|
||||
into
|
||||
.IR file .
|
||||
If you do not name
|
||||
.IR file ,
|
||||
.B ve
|
||||
writes the audit table into
|
||||
.BR data-a .
|
||||
.sp \n(pDu
|
||||
\fBve\fR audits a table by recording each addition,
|
||||
modification, and deletion you make to it,
|
||||
and storing this information in its audit table.
|
||||
The audit table looks like the table,
|
||||
with the addition of two columns in the beginning of each record:
|
||||
the \fItime stamp\fR column and the \fImodification code\fR column.
|
||||
.sp \n(pDu
|
||||
The first column of each row in the table must be a unique number
|
||||
so that rows can be tracked accurately.
|
||||
\fBve\fR manages these numbers and assigns new ones to the rows
|
||||
you add.
|
||||
If the table already exists,
|
||||
\fBve\fR begins record numbering at the largest record number in the table plus
|
||||
one; for new tables, \fBve\fR begins record numbering at one.
|
||||
.sp \n(pDu
|
||||
Each time you add a record (code \fBa\fR), change a record (code \fBc\fR),
|
||||
or delete one (code \fBd\fR),
|
||||
\fBve\fR records in the audit table the date and time, the modification code,
|
||||
and the number of the record.
|
||||
When you change or delete a record,
|
||||
.B ve
|
||||
also stores it in the audit table the data that the record contained before
|
||||
you changed or deleted it.
|
||||
.IP "\fB-v \fIfile\fR"
|
||||
Use
|
||||
.I file
|
||||
as the validation table.
|
||||
If you do not name
|
||||
.IR file ,
|
||||
.B ve
|
||||
uses
|
||||
.B data-v
|
||||
by default.
|
||||
If the validation table does not exist,
|
||||
.B ve
|
||||
creates it,
|
||||
then uses itself to edit the new validation table so you
|
||||
can enter validation requirements for desired columns
|
||||
before you edit the table.
|
||||
.PP
|
||||
When you include a validation table in the command line,
|
||||
\fBve\fR checks the data as it is entered into columns,
|
||||
which are specified in the validation table,
|
||||
to make sure they meet certain requirements.
|
||||
.PP
|
||||
The first header record of the validation table contains
|
||||
a \fIname\fR column,
|
||||
a \fIcharacter\fR column,
|
||||
a \fIlength\fR column, and
|
||||
a \fItable look-up\fR column,
|
||||
in that order.
|
||||
.IP "\fIname column\fR"
|
||||
This names a column from the table being validated.
|
||||
.IP "\fIcharacter column\fR"
|
||||
Give the valid
|
||||
characters or ranges of characters for data in this column
|
||||
Characters and ranges must be separated by commas (,).
|
||||
Ranges or characters that are preceded by an `!' exclude
|
||||
that range or character from the valid list.
|
||||
For example, the validation string \fBa-z,!y,1-9,#,., ,,,\fR
|
||||
means that all lower-case characters with the exception of \fIy\fR are valid,
|
||||
as are numerals from 1 to 9, pound symbols, periods, blanks, and commas.
|
||||
By contrast, the string \fB!0-9\fR excludes all numerals from the column.
|
||||
.IP "\fIlength column\fR"
|
||||
Set the length limit of the column, as follows:
|
||||
.RS
|
||||
.IP \fB<\fIn\fR
|
||||
The column cannot exceed
|
||||
.I n
|
||||
characters in length.
|
||||
.IP \fB>\fIn\fR
|
||||
The column cannot be less than
|
||||
.I n
|
||||
characters long.
|
||||
The \fB<\fR and \fB>\fR symbols can be used with each other.
|
||||
For example,
|
||||
\fI>10,<28\fR specifies that the length of the data in this column
|
||||
must be at least 11 and not more than 27 characters long.
|
||||
.IP \fB=\fIn\fR
|
||||
The column can contain only
|
||||
.I n
|
||||
characters.
|
||||
.IP \fB!\fR
|
||||
Zero indicator.
|
||||
This can used with any of the above symbols to indicate that the column
|
||||
can also have a length of zero.
|
||||
For example, \fI!,=5\fR means that the column can contain zero characters;
|
||||
if it does not contain zero characters, it must contain exactly five
|
||||
characters.
|
||||
.RE
|
||||
.IP "\fItable look-up column\fR"
|
||||
Tell
|
||||
.B ve
|
||||
to check the data entered against the contents of an existing table.
|
||||
When the name of the table is preceded by `!', data entered
|
||||
in the column must \fInot\fR be in the table; otherwise they \fImust\fR
|
||||
be in the table.
|
||||
.sp \n(pDu
|
||||
You can create an index table with the command
|
||||
.BR vindex .
|
||||
It names them after the column you are \fBvindex\fRing, which is
|
||||
called the \fIkey column\fR.
|
||||
If the name of the key column is longer than 11 characters,
|
||||
.B vindex
|
||||
truncates the name to 11 characters.
|
||||
It also converts blanks in the key column's name to `_'.
|
||||
.sp \n(pDu
|
||||
For example, the specification \fI!name\fR tells \fBve\fR to
|
||||
check the data against a table comprised
|
||||
of all text located in a column named \fIname\fR.
|
||||
If the data are \fInot\fR found in the table,
|
||||
then it passes validation.
|
||||
.SH Commands
|
||||
.\".ds EK \s-1<ESC>\s+1
|
||||
.ds EK <ESC>
|
||||
The following table gives the \fBve\fR edit commands.
|
||||
\fBve\fR uses two modes when editing a table:
|
||||
\fIcommand mode\fR and \fIinsert mode\fR.
|
||||
Commands that switch \fBve\fR from command to insert mode are indicated
|
||||
by \*(EK.
|
||||
The ESC (escape) key switches \fBve\fR from insert to command mode.
|
||||
.PP
|
||||
The commands \fBc\fR and \fBd\fR commands require \fItargets\fR.
|
||||
A target is the destination for the command being executed.
|
||||
For example, the command \fBdfa\fR means,
|
||||
``delete text from the cursor
|
||||
up to and including the first \fIa\fR character encountered.''
|
||||
In this case, the target command is \fIf\fR.
|
||||
In the table, commands that can be used as targets for the \fBc\fR and
|
||||
\fBd\fR commands are indicated by \fB(t)\fR.
|
||||
.PP
|
||||
Some commands recognize a number that indicates how many times it should
|
||||
execute.
|
||||
For example, the command \fB5l\fR means, ``Move right five characters\fR'';
|
||||
the command \fB3rP\fR means,
|
||||
``Replace the next three characters with the character \fIP\fR.''
|
||||
Counts may also be used with targets; for example,
|
||||
command \fBc2w\fR means,
|
||||
``Change the next two words.''
|
||||
Commands that recognize counts are indicated by a \fB(c)\fR.
|
||||
.nf
|
||||
.sp \n(pDu
|
||||
.ta 0.5i 2.0i
|
||||
\fICommand Description\fR
|
||||
.tc .
|
||||
\fBA\fItext\fR\*(EK Append text at field end
|
||||
\fBa\fItext\fR\*(EK Append text after cursor
|
||||
\fBB\fR Back field (c)
|
||||
\fBb\fR Back word (t,c)
|
||||
\fBC\fR\*(EK Change to field end
|
||||
\fBc\fR\*(EK Change to target
|
||||
\fBD\fR Delete to field end
|
||||
\fBd\fR Delete to target
|
||||
\fBdd\fR Delete record
|
||||
\fBe\fR End of word (t,c)
|
||||
\fBF\fIx\fR Find x left (t,c)
|
||||
\fBf\fIx\fR Find x right (t,c)
|
||||
\fBG\fR Go to last record (c)
|
||||
\fBH\fR First field
|
||||
\fBh\fR Left character (t,c)
|
||||
\fBI\fItext\fR\*(EK Insert text at field start
|
||||
\fBi\fItext\fR\*(EK Insert text before cursor
|
||||
\fBj\fR Down field (c)
|
||||
\fBk\fR Up field (c)
|
||||
\fBL\fR Last field
|
||||
\fBl\fR Right character (t,c)
|
||||
\fBm\fR Mark search field
|
||||
\fBM\fR Unmark search field
|
||||
\fBn\fR Get next record
|
||||
\fBO\fItext\fR\*(EK Open new record
|
||||
\fBo\fItext\fR\*(EK Open new field
|
||||
\fBP\fR Put yanked record
|
||||
\fBp\fR Put yanked field
|
||||
\fBq\fR Quit \fBve\fR
|
||||
\fBR\fR\*(EK Replace
|
||||
\fBr\fIx\fR Replace with \fIx\fR
|
||||
\fBS\fR Redraw the screen
|
||||
\fBs\fR\*(EK Substitute text (c)
|
||||
\fBt\fR Table display
|
||||
\fBu\fR Undo last command
|
||||
\fBv\fR Validation display
|
||||
\fBW\fR Write record
|
||||
\fBw\fR Next word (t,c)
|
||||
\fBx\fR Delete character (c)
|
||||
\fBY\fR Yank current record
|
||||
\fBy\fR Yank current field
|
||||
\fBZZ\fR Write record & quit
|
||||
\fBz\fR Field display
|
||||
\fB;\fR Repeat F/f cmd (t)
|
||||
\fB^\fR Start of field (t)
|
||||
\fB$\fR End of field (t)
|
||||
\fB/\fItext\fB\*(EK\fR Search for text
|
||||
\fB/\*(EK\fR Repeat search
|
||||
\fB-\fR Get preceding record
|
||||
\fB%\fR Execute the shell
|
||||
\fB!\fR Shell escape
|
||||
\fB!!\fR Repeat shell escape
|
||||
\fB>\fR Scroll field left
|
||||
\fB<\fR Scroll field right
|
||||
\fB#\fR Help file(s) display
|
||||
RETURN Next field (c)
|
||||
TAB Next field (c)
|
||||
SPACE Right character(t,c)
|
||||
.tc
|
||||
.fi
|
||||
.PP
|
||||
The next table
|
||||
gives two other kinds of \fBve\fR commands \(em
|
||||
\fIcolon\fR commands and \fIcontrol-key\fR commands, all of which
|
||||
map directly to commands in given in the previous table.
|
||||
Colon commands are provided for users familiar with \fBvi\fR or \fBed\fR.
|
||||
Control-key commands let you define command macros
|
||||
by specifying the control key character and the command or commands
|
||||
to be executed each time the control key is hit.
|
||||
These definitions, or \fImacros\fR are defined in the
|
||||
\fB/rdb\fR-formatted file \fB.verc\fR located in the your home directory.
|
||||
If there is no \fB.verc\fR file, then the default control-key
|
||||
commands apply.
|
||||
If you are in insert mode when a control key is hit,
|
||||
\fBve\fR attempts to restore that mode after successful execution of the macro.
|
||||
.DS
|
||||
.ta 1.0iC 2.0iC 3.0iC 4.0iC
|
||||
\fICommand Maps to Command Maps to\fR
|
||||
:h[elp] # \fB<ctrl-A>\fR #
|
||||
:n[ext] n \fB<ctrl-R>\fR S
|
||||
:o[pen] O \fB<ctrl-T>\fR t
|
||||
:q[uit] q \fB<ctrl-Q>\fR ZZ
|
||||
:s[hell] \fB<ctrl-S>\fR %
|
||||
:w[rite] \fB<ctrl-W>\fR W
|
||||
:!cmd !cmd \fB<ctrl-V>\fR v
|
||||
:!! !! \fB<ctrl-D>\fR dd
|
||||
.DE
|
||||
.SH "See Also"
|
||||
.B
|
||||
vindex
|
||||
.R
|
||||
.br
|
||||
COHERENT Lexicon:
|
||||
.B
|
||||
elvis,
|
||||
vi
|
||||
.R
|
||||
Reference in New Issue
Block a user