10.3 Syntax of sed Commandssed commands have the general form:
sed copies each line of input into the pattern space. sed instructions consist of addresses and editing commands . If the address of the command matches the line in the pattern space, the command is applied to that line. If a command has no address, it is applied to each input line. If a command changes the contents of the pattern space, subsequent commands and addresses are applied to the current line in the pattern space, not the original input line. commands
consist of a single letter or symbol; they are described later, alphabetically and by group. arguments
include the label supplied to 10.3.1 Pattern Addressing
A sed
command can specify zero, one, or two addresses. An address can be a line number, the symbol 10.3.2 Examples
Braces ( [/pattern /[,/pattern /]]{ command1 command2 } The opening curly brace must end its line, and the closing curly brace must be on a line by itself. Be sure there are no spaces after the braces. |
|