
c | 761
sed
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
a
[address]a\
text
[address1[,address2]]a \ {G}
text
Append text following each line matched by address.Iftext goes
over more than one line, newlines must be “hidden” by preceding
them with a backslash. The text is terminated by the first newline
that is not hidden in this way. The text is not available in the
pattern space, and subsequent commands cannot be applied to it.
The results of this command are sent to standard output when the
list of editing commands is finished, regardless of what happens to
the current line in the pattern space.
The GNU version accepts two addresses and allows you to put the
first line of text on the same line as the a command.
Example
$a\
This goes after the last line in the file\
(marked by $). This text is escaped at the\
end of each line, except for the last one.
b
[address1[,address2]]b[label]
Unconditionally transfer control to :label elsewhere in script. That
is, the command following the label is the next command applied
to the current line. If no label is specified, control falls through to
the end of the script, so no more commands are applied to the
current line.
Example
# Ignore HTML tables; resume script after </table>:
/<table/,/<\/table>/b
c
[address1[,address2]]c\
text
Replace (change) the lines selected by the address(es) with text.
(See a for