Denis Vlasenko | 2659c63 | 2008-06-14 06:04:59 +0000 | [diff] [blame] | 1 | a='abc' |
2 | r=${a//b/\041#} | ||||
Denys Vlasenko | b0fbe4b | 2010-08-05 17:19:27 +0200 | [diff] [blame] | 3 | echo 1 $r |
4 | echo 2 ${a//b/\041#} | ||||
5 | echo 3 "${a//b/\041#}" | ||||
Denis Vlasenko | 2659c63 | 2008-06-14 06:04:59 +0000 | [diff] [blame] | 6 | |
7 | a='abc' | ||||
8 | r=${a//b/\\041#} | ||||
Denys Vlasenko | b0fbe4b | 2010-08-05 17:19:27 +0200 | [diff] [blame] | 9 | echo 4 $r |
10 | echo 5 ${a//b/\\041#} | ||||
11 | echo 6 "${a//b/\\041#}" | ||||
Denis Vlasenko | 2659c63 | 2008-06-14 06:04:59 +0000 | [diff] [blame] | 12 | |
13 | a='abc' | ||||
14 | b='\041#' | ||||
15 | r=${a//b/$b} | ||||
Denys Vlasenko | b0fbe4b | 2010-08-05 17:19:27 +0200 | [diff] [blame] | 16 | echo 7 $r |
17 | echo 8 ${a//b/$b} | ||||
18 | echo 9 "${a//b/$b}" | ||||
Denis Vlasenko | 2659c63 | 2008-06-14 06:04:59 +0000 | [diff] [blame] | 19 | |
20 | a='abc' | ||||
21 | b='\' | ||||
22 | r="${a//b/$b}" | ||||
Denys Vlasenko | b0fbe4b | 2010-08-05 17:19:27 +0200 | [diff] [blame] | 23 | echo 10 $r |
24 | echo 11 ${a//b/$b} | ||||
25 | echo 12 "${a//b/$b}" | ||||
Denis Vlasenko | 2659c63 | 2008-06-14 06:04:59 +0000 | [diff] [blame] | 26 | |
27 | a='abc' | ||||
28 | b='\\' | ||||
29 | r="${a//b/$b}" | ||||
Denys Vlasenko | b0fbe4b | 2010-08-05 17:19:27 +0200 | [diff] [blame] | 30 | echo 13 $r |
31 | echo 14 ${a//b/$b} | ||||
32 | echo 15 "${a//b/$b}" | ||||
Denis Vlasenko | 2659c63 | 2008-06-14 06:04:59 +0000 | [diff] [blame] | 33 | |
34 | a='abc' | ||||
35 | b='\t' | ||||
36 | r="${a//b/$b}" | ||||
Denys Vlasenko | b0fbe4b | 2010-08-05 17:19:27 +0200 | [diff] [blame] | 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}" |