Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
sed(1) OSS Shell and Utilities Reference Manual
(2)c\
text Deletes the pattern space. With a 0 or 1 address or at the end of a 2-address range,
places text on the output. Then it starts the next cycle.
(2)d Deletes the pattern space. Then it starts the next cycle.
(2)D Deletes the initial segment of the pattern space through the first newline character.
Then it starts the next cycle.
(2)g Replaces the contents of the pattern space with the contents of the hold space.
(2)G Appends the contents of the hold space to the pattern space, after first appending a
newline character.
(2)h Replaces the contents of the hold space with the contents of the pattern space.
(2)H Appends the contents of the pattern space to the hold space, after first appending a
newline character.
(1)i\
text Writes text to standard output before reading the next line into the pattern space.
(2)l Writes the pattern space to standard output, showing nonprinting characters as 3-digit
octal values. Long lines are folded, with the point of folding indicated by
<Backslash><Return>. The end of each line is marked with a $.
Certain characters are shown as escape sequences as follows:
\\ Backslash
\a Alert
\b Backspace
\f Formfeed
\n Newline
\r Carriage return
\t Tab
\v Vertical tab
(2)n Writes the pattern space to standard output. It replaces the pattern space with the next
line of input.
(2)N Appends the next line of input to the pattern space with an embedded newline charac-
ter. (The current line number changes.) You can use this subcommand to search for
patterns that are split onto two lines.
(2)p Writes the pattern space to standard output.
(2)P Writes the initial segment of the pattern space through the first newline character to
standard output.
(1)q Branches to the end of the script. It does not start a new cycle.
(1)r read_file
Reads the contents of read_file. It places contents on the output before reading the
8−4 Hewlett-Packard Company 527188-004