16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

\< Matches the empty string preceding the start of a word. A word is a series<br />

of alphanumeric or underscore characters preceded by and followed by<br />

characters that are not alphanumeric or underscore.<br />

\> Matches the empty string following the end of a word. A word is a series of<br />

alphanumeric or underscore characters preceded by and followed by<br />

characters that are not alphanumeric or underscore.<br />

[string]<br />

Matches any of the characters in the class defined by string. For example,<br />

[aeiouy] matches any of the vowels. You can put a range of characters in a<br />

class by specifying the first and last characters of the range, with a hyphen<br />

(-) between them. For example, in ASCII [A–Za–z] matches any upper or<br />

lowercase letter. If the first character of a class is the caret (^), the class<br />

matches any character not specified inside the square brackets. Thus, in<br />

ASCII [a–z_][^0–9] matches a single alphabetic character or the<br />

underscore, followed by any nonnumeric character.<br />

\( ...\) A set of characters in the pattern can be surrounded by escaped<br />

parentheses. See “Summary of Replacement Patterns” for a discussion of<br />

the \n replacement pattern. This is not affected by the setting of magic.<br />

~ Matches the replacement part of the last substitute command.<br />

A replacement (indicated by repl in the command descriptions) describes what to<br />

put back in a line for the set of characters matched by the regular expression.<br />

Summary of Replacement Patterns<br />

ex <strong>Command</strong>s<br />

& Is replaced by the entire string of matched characters.<br />

~ Is replaced by the entire replacement pattern from the last substitute.<br />

\n Is replaced by the string that matched the nth occurrence of a \( ...\) in the<br />

regular expression. For example, consider:<br />

s/\([a-zA-Z]*\)our/\1or/<br />

The \1 represents the string that matched the regular expression<br />

\([a-zA-Z]*\). Thus the previous command might change the word colour to<br />

color.<br />

\u Turns the next character in the replacement to uppercase.<br />

\l Turns the next character in the replacement to lowercase.<br />

\U Turns the following characters in the replacement to uppercase.<br />

\L Turns the following characters in the replacement to lowercase.<br />

\E, \e Turns off the effects of \U or \L.<br />

You can enter these commands as shown in ex mode. In vi mode, they must be<br />

preceded by the colon (:) character.<br />

ab[breviate] lhs rhs<br />

Indicates that the word lhs should be interpreted as abbreviation for rhs.<br />

(See “Context-Dependent Movement <strong>Command</strong>s” on page 762 for the<br />

definition of word.) If you enter lhs surrounded by white space in vi INSERT<br />

mode, it is automatically changed into rhs. If you do not specify any<br />

vi<br />

Chapter 2. Shell command descriptions 771

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!