HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)

e
ex(1) ex(1)
current indicator line shall be affected by the editor options,
autowrite and wri-
teany
.
set se[t][all]
se[t][no]boolean-option
?
se
[t] value-option[?]
se[t] boolean-option
se[t] noboolean-option
se[t] value-option=value
Set and display the values of the editor options (see Editor Options below).
With no arguments, the command prints those editor options whose values have been
changed from the default settings. If all is specified, it prints all current option
values.
The second and third forms display the current value of the specified option. The
? is
necessary only for Boolean options.
The fourth form turns a Boolean option on. The fifth form turns a Boolean option off.
The sixth form assigns values to string and numeric options. Spaces and tabs in strings
must be escaped with a leading backslash (
\).
The last five forms can be combined; interpretation is left-to-right.
shell sh[ell]
Execute the command interpreter specified by the shell editor option (see Editor
Options below). Editing is resumed when you exit from the command interpreter.
source so[urce] file
Read and execute commands from the specified file. so commands can be nested. The
maximum supported nesting depths is implementation defined, but shall be at least one.
substitute range s[ubstitute] /re/repl/ options count flags
range s options count flags
range & options count flags
range sr options count flags
range ˜ options count flags
range s\?repl
range s\&repl
On each specified line, the first instance of the pattern re is replaced by the string repl.
(See Regular Expressions and Replacement Strings above.) Any character other than a
letter or a digit can be used to delimit the pattern instead of the
/.
If you include the
g (global) option, all instances of the pattern in the line are substi-
tuted.
If you include the c (confirm) option, you are queried about whether to perform each
individual substitution, as follows: Before each substitution the line is displayed with
the pattern to be replaced marked underneath with carets (ˆ). Type y to cause the sub-
stitution to be performed; any other input to abort it. The last line substituted becomes
the current line.
If the substitution pattern re is omitted (s//repl/), the more recently set of either the
substitution string or the scanning string is used (see Regular Expressions above).
If the s or & forms of the command are used, the substitution pattern defaults to the
previous substitution string and the replacement string defaults to the previous replace-
ment string used.
If the sr or ˜ forms of the command are used, the substitution pattern defaults to the
more recently set of either the substitution string or the scanning string and the
replacement string defaults to the previous replacement string used.
The form s\?repl is equivalent to s/scan-re/repl/, where scan-re is the previous scan-
ning string.
Section 1258 Hewlett-Packard Company 9 HP-UX 11i Version 1: September 2005