Beruflich Dokumente
Kultur Dokumente
Modifications to:
Command Address or Range Input Stream Output Stream Pattern Space Hold Buffer
=
a 1
b 2
c 2
d 2
D 2
g 2
G 2
h 2
H 2
i 1
l 1
n 2
N 2
p 2
P 2
q 1
r 1
s 2
t 2
w 2
x 2
y 2
Extensions:
Command Description
Q Immediately quit the sed script without processing any more input. (zero or one address command)
R filename Append a line read from filename. (zero or one address command)
If no s/// has done a successful substitution since the last input line was read and since the last t or T
T label
command, then branch to label; if label is omitted, branch to end of script. (accepts address range)
W filename Write the first line of the current pattern space to filename. (accepts address range)
Address Ranges:
Format Description Format (ext) Description
number Match only the specified line number. first~step Match every step'th line starting with line first.
Start out in "matched first address" state, until
$ Match the last line. 0, addr2
addr2 is found.
Match lines matching the regular Will match addr1 and the N lines following
/regex/ addr1,+N
expression regex. addr1.
Match lines matching the regular Will match addr1 and the lines following addr1
\cregexc expression regex. The c may be any addr1,~N until the next line whose input line number is a
character. multiple of N.