summaryrefslogtreecommitdiffhomepage
path: root/shell/hush_test/hush-vars/var_bash3.tests
blob: 146dbb6a542bf562f119f1a2a65e43e97b88aaa9 (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
a='abc'
r=${a//b/\041#}
echo 1 $r
echo 2 ${a//b/\041#}
echo 3 "${a//b/\041#}"

a='abc'
r=${a//b/\\041#}
echo 4 $r
echo 5 ${a//b/\\041#}
echo 6 "${a//b/\\041#}"

a='abc'
b='\041#'
r=${a//b/$b}
echo 7 $r
echo 8 ${a//b/$b}
echo 9 "${a//b/$b}"

a='abc'
b='\'
r="${a//b/$b}"
echo 10 $r
echo 11 ${a//b/$b}
echo 12 "${a//b/$b}"

a='abc'
b='\\'
r="${a//b/$b}"
echo 13 $r
echo 14 ${a//b/$b}
echo 15 "${a//b/$b}"

a='abc'
b='\t'
r="${a//b/$b}"
echo 16 $r
echo 17 ${a//b/$b}
echo 18 "${a//b/$b}"
echo 19 ${a//b/\t}
echo 20 "${a//b/\t}"