blob: 5514868d4cd15200383ade6db1800d86af9a946a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
H
g/./m0
g//a\
hello world
# lines beginning with a `#' should be ignored
g/hello /# even in global commands \
s/lo/p!/\
a\
order\
.\
# and in the command list \
i\
caos\
.\
-1s/l/L
u
u
17,33g/[A-I]/-1d\
+1c\
hello world\
.\
47
;d
# don't change current address if no match
g/xxx/1d
;j
g/help! world/I/caos/d\
-;/order/;d
# split lines
g/./s/hello world/hello\
world/
# use replacement from last substitution
g/./s/animated/%/
g/./Is/difficulty/%
# to be undone
g/./s//x/g
u
w out.o
a
hello
.
g/hello/Q
# not reached
w out.o
|