Control
This section describes the pick up and put down.
Function | Syntax/Description |
---|---|
negation | [Line1 [,Line2] ]! The ! (exclamation point) applies the command that follows it on the same line to the parts of the input file that are not selected by Line1 and Line2. |
command groups | [Line1 [,Line2] ]{ grouped commands } The { (left brace) and the } (right brace) enclose a set of commands to be applied as a set to the input lines selected by Line1 and Line2. The first command in the set can be on the same line or on the line following the left brace. The right brace must be on a line by itself. You can nest groups within groups. |
labels | :Label Marks a place in the stream of editing command to be used as a destination of each branch. The symbol Label is a string of up to 8 bytes. Each Label in the editing stream must be different from any other Label. |
branch to label, unconditional | [Line1 [,Line2] ]bLabel Branches to the point in the editing stream indicated by Label and continues processing the current input line with the commands following Label. If Label is null, branches to the end of the editing stream, which results in reading a new input line and starting the editing stream over. The string Label must appear as a Label in the editing stream. |
test and branch | [Line1 [,Line2] ]tLabel If any successful substitutions were made on the current input line, branches to Label. If no substitutions were made, does nothing. Clears the flag that indicates a substitution was made. This flag is cleared at the start of each new input line. |
wait | [Line1 ]q Stops editing in an orderly fashion by writing the current line to the output, writing any appended or read test to the output, and stopping the editor. |
find line number | [Line1 ]= Writes to standard output the line number of the line that matches Line1. |