Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
ex(1) OSS Shell and Utilities Reference Manual
[range] x[it][!][file]
Performs a write subcommand if any changes have been made to the current buffer since
the last write to any file.
Unless the subcommand fails because an attempt to write lines to a file did not succeed,
the ex program exits after an x subcommand. This subcommand is affected by the wri-
teany and readonly editor options.
[range] ya[nk][buffer][count]
Places the specified lines in the named buffer. If no buffer is specified, the unnamed
buffer is used (where the most recently deleted or yanked text is placed by default).
[line] z [type][count][flags]
If type is omitted, count lines following the specified line are written. The default for
count is the value of the window editor option. The type argument changes the position
at which line is written on the screen by affecting the number of lines written before and
after line.
If type is specified, it is one of the following:
- (dash) Places line at the bottom of the screen.
+ (plus sign)
Places line at the top of the screen.
. (period) Places line in the middle.
^(circumflex)
Writes out count lines starting count*2 lines before the addressed line; the net
effect of this is that a zˆ subcommand following another z subcommand writes
the previous page.
= (equal sign)
Centers the addressed line on the screen with a line of - (dash) characters writ-
ten immediately before and after it. The number of preceding and following
lines of text written are reduced to account for these lines of hyphens.
In all cases, the current line is the last line written, with the exception of the = type,
which causes the current line to be that addressed in the subcommand.
! subcommand
[range]! subcommand
Passes the remainder of the line after the ! (exclamation point) character to the program
named in the SHELL environment variable for execution. A warning is issued if the
buffer has been changed since the last write. A single ! character is written when the
subcommand completes. The current line position is not affected.
Within the text of subcommand, % (percent sign) and # (number sign) are expanded as
pathnames (the current and alternative pathnames, respectively), and ! is replaced with
the text of the previous ! subcommand. (Thus, !! repeats the previous ! subcommand.) If
any such expansion is performed, the expanded line is echoed.
You can override the special meanings of %, #, and ! by escaping them with a \
(backslash) character. This subcommand is affected by the autowrite and writeany edi-
tor options.
In the second form of the ! subcommand, the remainder of the line after the ! is passed to
the program named in the SHELL environment variable, as described previously. The
specified lines are provided to the program as standard input; the resulting output
3−114 Hewlett-Packard Company 527188-004