MPE/iX Shell and Utilities Reference Manual, Vol 2

sed(1) MPE/iX Shell and Utilities sed(1)
a,bH holds a copy of the text in the pattern buffer by appending it to the end of the hold
buffer after appending a newline.
ai\ inserts text. This command is similar to the a command, except that its text is output
immediately.
a,bl lists the pattern buffer (input line) onto the standard output so that non-printable
characters are visible. This command works analogously to the l command in ed.
sed folds long lines to suit the output device, indicating the point of folding with a
backslash (\).
a,bn prints the pattern space on standard output if the default printing of the pattern space
is not suppressed (because of the –n option). The next line of input is then read, and
the processing of the line continues from the location of the n command in the script.
a,bN appends the next line of input to the end of the pattern buffer, using a newline to sep-
arate the appended material from the original. The current line number changes.
a,bp prints the text in the pattern buffer to the standard output. The –n option does not
disable this form of output. If you do not use –n, the pattern buffer is printed twice.
a,bP operates like the p command, except that it prints the text in the pattern buffer only
up to and including the first newline character.
aq quits sed, skipping the rest of the script and reading no more input lines.
ar file reads text from file and places it onto the standard output before reading the next
input line. The timing of this operation is the same as for the a command. If file does
not exist or cannot be read, sed treats it as an empty file.
a,bs/reg/sub/[gpn][w file]
substitutes the new text string sub for text matching the regular expression, reg. Nor-
mally, the s command only replaces the first such matching string in each input line.
You can use any single printable character other than space or newline instead of the
slash (/) to delimit reg and sub. The delimiter itself may appear as a literal character
in reg or sub if you precede it with a backslash (\). You may omit the trailing delim-
iter.
If an ampersand (&) appears in sub, sed replaces it with reg.A\n in reg matches an
embedded newline in the pattern buffer (resulting, for example, from an N com-
mand).
The command may be followed by a combination of the following:
n substitutes only the nth occurrence of regexp.
g forces all occurrences (rather than the default first occurrence) of regexp to
be replaced.
1-508 Commands and Utilities