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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

|<br />

a,bN Appends the next line of input to the end of the pattern buffer, using a new<br />

line to separate the appended material from the original. The current line<br />

number changes.<br />

a,bp Prints the text in the pattern buffer to the standard output. The –n option<br />

does not disable this form of output. If you do not use –n, the pattern buffer<br />

is printed twice.<br />

a,bP Operates like the p subcommand, except that it prints the text in the pattern<br />

buffer only up to and including the first newline character.<br />

aq Quits sed, skipping the rest of the script and reading no more input lines.<br />

ar file Reads text from file and writes it to the standard output before reading the<br />

next input line. The timing of this operation is the same as for the a<br />

subcommand. If file does not exist or cannot be read, sed treats it as an<br />

empty file.<br />

a,bs/reg/ sub/[gpn] [wfile]<br />

Substitutes the new text string sub for text matching the regular expression,<br />

reg. Normally, the s subcommand replaces only the first such matching<br />

string in each input line. You can use any single printable character other<br />

than space or newline instead of the slash (/) to delimit reg and sub. The<br />

delimiter itself may appear as a literal character in reg or sub if you precede<br />

it with a backslash (\). You can omit the trailing delimiter.<br />

If an ampersand (&) appears in sub, sed replaces it with the string<br />

matching reg. For more information, see Appendix C. A \n in reg matches<br />

an embedded newline in the pattern buffer (resulting, for example, from an<br />

N subcommand). The subcommand can be followed by a combination of<br />

the following:<br />

n Substitutes only the nth occurrence of regexp.<br />

g Replaces all non-overlapping occurrences of regexp rather than the<br />

default first occurrence. If both g and n are specified, the last one<br />

specified takes precedence.<br />

p Executes the print (p) subcommand only if a successful substitution<br />

occurs.<br />

w file Writes the contents of the pattern buffer to the end of file, if a<br />

substitution occurs. When the variable _<strong>UNIX</strong>03=YES is set, the file<br />

must be preceded with one or more s. When the variable<br />

_<strong>UNIX</strong>03 is unset or is not set to YES, zero separation<br />

between w and file is allowed.<br />

a,bt [label]<br />

Branches to the indicated label if a successful substitution has occurred<br />

since either reading the last input line or running the last t subcommand. If<br />

you do not specify label, sed branches to the end of the script.<br />

a,bw file<br />

Writes the text in the pattern buffer to the end of file.<br />

a,bx Exchanges the text in the hold buffer with that in the pattern buffer.<br />

sed<br />

a,by/set1/set2/<br />

Transliterates any input character occurring in set1 to the corresponding<br />

element of set2. The sets must be the same length. You can use any<br />

character other than backslash or newline instead of the slash to delimit the<br />

strings.<br />

Chapter 2. Shell command descriptions 537

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

Saved successfully!

Ooh no, something went wrong!