Command | Description |
---|---|
b label |
|
d | Clear the contents of pattern space and start a new cycle. |
D | Delete the first line from pattern space. Control then passes to the top of the script. If command 'D' empties the pattern space, a new line will be read in; otherwise, no new line will be read in. |
g | Overwrite the contents of pattern space with hold space. |
G | Append the contents of hold space to pattern space, separate them by a newline character. |
h | Overwrite the contents of hold space with pattern space. |
H | Append the contents of pattern space to hold space, separate them by a newline character. |
n | Print the contents of pattern space and overwrite it with next line. Control passes to the command following this 'n'. |
N | Append next line to pattern space. Next line is separated from the original pattern space by a newline character. |
p | Print the contents of pattern space. |
P | Print the first line of pattern space. |
q | Print the contents of pattern space then exit. |
t |
|
w | Write the contents of pattern space to the file specified after the w command. |
x | Exchange the contents of pattern space and hold space. |