= d command
.delete lines
.n is not supported for xx-xx[n][,b][.s] pattern.
(1) x[n] pattern
.delete following 3 lines.
0000001|A
d3 |B
0000003|C
0000004|D
0000005|E
0000006|F
===>
0001000|A
0005000|E
(2) xx-xx pattern
.delete the range of lines.
0000001|A
dd |B
0000003|C
0000004|D
dd |E
0000006|F
===>
0001000|A
0006000|F
(3) x[n][,b][.s] pattern
.repeat 3 times to delete 2 lines with intermediate 4 lines left.
0000001|A
r1 d1 d3,2.4 |B
d2 0000003|C
s1 0000004|D
s2 0000005|E
s3 0000006|F
s4 0000007|G
r2 d1 0000008|H
d2 0000009|I
s1 0000010|J
s2 0000011|K
s3 0000012|L
s4 0000013|M
r3 d1 0000014|N
d2 0000015|O
0000016|P
===>
0001000|A
0004000|D
0005000|E
0006000|F
0007000|G
0010000|J
0011000|K
0012000|L
0013000|M
0016000|P
(4) xx-xx[,b][.s] pattern
.repeat in the range to delete 3 lines with intermediate 2 lines left.
0000001|A
rr d1 dd,3.2 |B
d2 0000003|C
d3 0000004|D
s1 0000005|E
s2 0000006|F
rr d1 0000007|G
d2 0000008|H
d3 0000009|I
s1 0000010|J
s2 0000011|K
rr d1 0000012|L
d2 0000013|M
d3 0000014|N
s1 dd |O
0000016|P
===>
0001000|A
0005000|E
0006000|F
0010000|J
0011000|K
0015000|O