
ex(1) | ex(1) |
| If an alternate ®le is speci®ed and the ®le exists, the write fails, but can be forced by |
| appending ! to the command. To append to an existing ®le, append >> to the com- |
| mand. If the ®le does not exist, an error is reported. |
| If the ®le is speci®ed as !string, string is interpreted as a system command, the com- |
| mand interpreter is invoked, and the speci®ed lines are passed as standard input to the |
| command. |
| The command wq is equivalent to a w followed by a q. wq! is equivalent to w! followed |
| by q. wq>> is equivalent to w>> followed by q. |
xit | x[it][!][>>] ®le |
| If changes have been made to the work area, a write command is executed with any |
| options (such as !, >>, or ®le) used by the write command. Then (in any case) the |
| quit command is executed. |
yank | range ya[nk] buffer count |
| Place the speci®ed lines in the named buffer. If no buffer is speci®ed, the unnamed |
| buffer is used (that is, the buffer where the most recently deleted or yanked text is |
| placed by default). |
(execute buffer) | * [buffer] |
| @ [buffer] |
| Execute the contents of buffer as an editor command. buffer can be the letter of a |
| named buffer (a−z) or * or @. The * and the @ forms of this command are equivalent. |
| If a buffer is not speci®ed or buffer is * or @, the buffer last named in a * or @ command |
| is executed. |
(line number) | line = ¯ags |
| Print the line number of the speci®ed line. The default is the last line. The current line |
| position is not affected. |
(scroll) | ^D |
| Print the next n lines, where n is the value of the scroll editor option. |
(shell escape) | ! command |
| range ! command |
| Pass the remainder of the line after the ! to the system command interpreter for execu- |
| tion. A warning is issued if the work area has been changed since the last write. A sin- |
| gle ! is printed when the command completes. The current line position is not affected. |
| Within the text of command, % and # are expanded as ®le names, and ! is replaced |
| with the text of the previous ! command. Thus, !! repeats the previous ! command. |
| When such expansion is performed, the expanded line is echoed. |
| If you specify range, the speci®ed lines are passed to the command interpreter as stan- |
| dard input. The output from the command replaces the speci®ed lines. |
(shift left) | range < count ¯ags |
| Shift the speci®ed lines to the left. The number of spaces to be deleted is determined by |
| the editor option shiftwidth. Only whitespace (blanks and tabs) is lost in shifting; |
| other characters are not affected. The last line changed becomes the current line. |
(shift right) | range > count ¯ags |
| Shift the speci®ed lines to the right by inserting whitespace The number of spaces |
| inserted is determined by the editor option shiftwidth. The last line changed |
| becomes the current line. |
(window) | line z type count ¯ags |
| The number of lines speci®ed by count are displayed. The default for count is the value |
| of the editor option window. |
| If type is omitted, count lines following the speci®ed line are printed. |
e
− 11 − | Section 1−251 |