-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.txt
51 lines (51 loc) · 1.41 KB
/
tests.txt
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
45
46
47
48
49
50
51
$sed G
$sed '/^$/d;G'
$sed 'G;G'
$sed 'n;d'
$sed '/regex/{x;p;x;}'
$sed '/regex/G'
$sed '/regex/{x;p;x;G;}'
$sed = | $sed 'N;s/\n/\t/'
$sed = | $sed 'N; s/^/ /; s/ *\(.\{6,\}\)\n/\1 /'
$sed '/./=' tests.txt | $sed '/./N; s/\n/ /'
$sed -n '$='
$sed 's/^[ \t]*//;s/[ \t]*$//'
$sed 's/^/ /'
$sed '/baz/s/foo/bar/g'
$sed '/baz/!s/foo/bar/g'
$sed '/\n/!G;s/\(.\)\(.*\n\)/&\2\1/;//D;s/.//'
$sed '$!N;s/\n/ /'
$sed -e :a -e '/\\$/N; s/\\\n//; ta4
$sed -e :a -e '$!N;s/\n=/ /;ta' -e 'P;D'
$sed -r ':a;s/(^|[^0-9.])([0-9]+)([0-9]{3})/\1\2,\3/g;ta'
$sed 10q
$sed q
$sed -e :a -e '$q;N;11,$D;ba'
$sed '$!N;$!D'
$sed -n '/regexp/{g;1!p;};h'
$sed -n '/regexp/{n;p;}'
$sed -n -e '/regexp/{=;x;1!p;g;$!N;p;D;}' -e h
$sed '/AAA/!d; /BBB/!d; /CCC/!d'
$sed '/AAA.*BBB.*CCC/!d'
$sed -e '/./{H;$!d;}' -e 'x;/AAA/!d;'
$sed -e '/./{H;$!d;}' -e 'x;/AAA/!d;/BBB/!d;/CCC/!d'
$sed -e '/./{H;$!d;}' -e 'x;/AAA/b' -e '/BBB/b' -e '/CCC/b' -e d
$sed -n '/^.\{65\}/p'
$sed -n '/regexp/,$p'
$sed '/Iowa/,/Montana/d'
$sed '$!N; /^\(.*\)\n\1$/!P; D'
$sed -n 'G; s/\n/&&/; /^\([ -~]*\n\).*\n\1/d; s/\n//; h; P'
$sed '$!N; s/^\(.*\)\n\1$/\1/; t; D'
$sed '1,10d'
$sed '$d'
$sed 'N;$!P;$!D;$d'
$sed '/pattern/d'
$sed '/^$/N;/\n$/N;//D'
$sed '/./,$!d'
$sed -n '/^$/{p;h;};/./{x;/./p;}'
$sed '/^Subject: */!d; s///;q'
$sed '/^Reply-To:/q; /^From:/h; /./d;g;q'
$sed 's/ *(.*)//; s/>.*//; s/.*[:<] *//'
$sed 's/^/> /'
$sed 's/^> //'
$sed -e :a -e 's/<[^>]*>//g;/</N;//ba'