Denys Vlasenko | 36f774a | 2010-09-05 14:45:38 +0200 | [diff] [blame] | 1 | a='abc' |
2 | r=${a//b/\041#} | ||||
3 | echo 1 $r | ||||
4 | echo 2 ${a//b/\041#} | ||||
5 | echo 3 "${a//b/\041#}" | ||||
6 | |||||
7 | a='abc' | ||||
8 | r=${a//b/\\041#} | ||||
9 | echo 4 $r | ||||
10 | echo 5 ${a//b/\\041#} | ||||
11 | echo 6 "${a//b/\\041#}" | ||||
12 | |||||
13 | a='abc' | ||||
14 | b='\041#' | ||||
15 | r=${a//b/$b} | ||||
16 | echo 7 $r | ||||
17 | echo 8 ${a//b/$b} | ||||
18 | echo 9 "${a//b/$b}" | ||||
19 | |||||
20 | a='abc' | ||||
21 | b='\' | ||||
22 | r="${a//b/$b}" | ||||
23 | echo 10 $r | ||||
24 | echo 11 ${a//b/$b} | ||||
25 | echo 12 "${a//b/$b}" | ||||
26 | |||||
27 | a='abc' | ||||
28 | b='\\' | ||||
29 | r="${a//b/$b}" | ||||
30 | echo 13 $r | ||||
31 | echo 14 ${a//b/$b} | ||||
32 | echo 15 "${a//b/$b}" | ||||
33 | |||||
34 | a='abc' | ||||
35 | b='\t' | ||||
36 | r="${a//b/$b}" | ||||
37 | echo 16 $r | ||||
38 | echo 17 ${a//b/$b} | ||||
39 | echo 18 "${a//b/$b}" | ||||
40 | echo 19 ${a//b/\t} | ||||
41 | echo 20 "${a//b/\t}" |