Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
ex(1) OSS Shell and Utilities Reference Manual
The ex Limits
The ex editor has the following maximum limits:
• 2048 bytes per line
• 256 bytes per global command list
• 128 bytes in the previous inserted and deleted text
• 128 bytes in a shell escape command
• 128 bytes in a string-valued option
• 32 bytes in a tag name
• 128 map macros with 2048 bytes total
SUBCOMMANDS
The ex subcommands affect the current line unless you specify otherwise. For information about
how to address lines in a file, see edit and vi. For a complete description of edit options, see Set-
ting Options on the vi reference page.
The ex Subcommands
ab[brev] word abbrev
Adds the specified abbreviation to the current abbreviation list.
[line] a[ppend][!]
Enters input mode and places text after the specified line. To place the text at the begin-
ning of the buffer, specify line 0. The ! (exclamation point) toggles the autoindent editor
option setting for the execution of this subcommand.
ar[gs] Writes the argument list (the list of arguments on start-up) with the current argument
inside [ and ] (left and right brackets). The argument list can later be replaced by the
arguments of the next subcommand.
[range] c[hange][!][count]
Enters input mode and replaces the lines in range with the input text. The current line is
the last line input. The ! (exclamation point) toggles the autoindent editor option set-
ting for the execution of this subcommand.
chd[ir][!][directory]
cd[!][directory]
Changes the current working directory to directory. If the current buffer has been
modified since the last write, the subcommand issues a warning and fails. You can over-
ride this warning by appending a ! (exclamation point) to the subcommand name.
[range] co[py] line [flags]
[range] t line [flags]
Places a copy of the lines in range after the specified line. Line 0 causes the lines to be
placed at the beginning of the buffer.
[range] d[elete][buffer][count][flags]
Deletes the specified lines from the buffer. If you specify a named buffer, the deleted
text is placed there; otherwise, the deleted text is placed in the unnamed buffer. The
current line is the line following the deleted lines, or the last line if the deleted lines
were at the end.
3−108 Hewlett-Packard Company 527188-007