ex.1 (2010 09)
e
ex(1) ex(1)
Change the working directory to directory .Ifdirectory is omitted, the value of the
HOME environment variable is used. If the work area has been modified since the last
write and the name of the file being edited does not begin with a slash (
/), a warning
is issued and the working directory is not changed. To force a change of directory in
this case, append the character
! to the command.
copy range co[py] line flags
range t line flags
A copy of the specified lines (range ) is placed after the specified destination line; line
0 specifies that the lines are to be placed at the beginning of the work area. (The
letter
t is an alternative abbreviation for the
copy command.)
crypt cr[ypt]
X
The user is prompted for a key with which to enter encryption mode. This command
can also be used to change the key entered from a previous
crypt command or the
-x command line option. If no key is supplied in response to the prompt (that is, only
carriage return is pressed), encryption mode is canceled and the work area is written
out in plain-text form by subsequent write commands.
While in encryption mode, all file input is decrypted using the current key. However,
while an input file is being processed, if a block of text (approximately 1024 bytes) is
encountered that contains only 7-bit ASCII characters, that block of text is assumed to
be plain-text and is not decrypted. All file output, except that piped via a
!
shell
escape to another command, is encrypted using the current key.
The temporary file used by the editor to manage the work area is not encrypted until
the current work area is discarded (or written out) and editing begins on a new file.
When creating a new file that requires encryption protection, ensure that the work
area file is also encrypted by specifying the
-x option when invoking the editor.
cr[ypt]
C
Encryption option. Same as the X command, except that all text read in is assumed to
have been encrypted.
delete range d[elete] buffer count
The specified lines are deleted from the work area. If a named buffer is specified, the
deleted text is saved in it. If no buffer is specified, the unnamed buffer is used (that
is, the buffer where the most recently deleted or yanked text is placed by default).
The new current line is the line after the deleted lines or the last line of the file if the
deleted lines were at the end of the file.
edit e[dit][!][+ line] file
ex[!][+ line ] file
Begin editing a new file (
ex is an alternative name for the edit command). If the
current work area has been modified since the last write, a warning is printed and the
command is aborted. This action can be overridden by appending the character ! to
the command (e! file). The current line is the last line of the work area unless it is
executed from within vi , in which case the current line is the first line of the work
area. If the +line option is specified, the current line is set to the specified position,
where line can be a number (or $) or specified as /re or ?re.
file f[ile]
Print the current file name and other information, including the number of lines and
the current position.
global range g[lobal][!] /re/ command...
range v/re/ command...
Perform command on lines within range (or on the entire work area if no range is
given) that contain re. First mark the lines within the given range that match the
pattern re. If the pattern is omitted, the more recently set of either the substitution
string or the scanning string is used (see Regular Expressions above). Then the given
commands are executed with
. set to each marked line. Any character other than a
6 Hewlett-Packard Company − 6 − HP-UX 11i Version 3: September 2010