Denys Vlasenko | e298ce6 | 2010-09-04 19:52:44 +0200 | [diff] [blame^] | 1 | # Test for correct handling of backslashes |
2 | a=qwerty | ||||
3 | |||||
4 | b=-$a-\t-\\-\"-\--\z-\*-\?- | ||||
5 | echo b1=$b | ||||
6 | echo "b1=$b" | ||||
7 | b="-$a-\t-\\-\"-\--\z-\*-\?-" | ||||
8 | echo b2=$b | ||||
9 | echo "b2=$b" | ||||
10 | b='-$a-\t-\\-\"-\--\z-\*-\?-' | ||||
11 | echo b3=$b | ||||
12 | echo "b3=$b" | ||||
13 | |||||
14 | c=$b | ||||
15 | echo "c=$c" | ||||
16 | c=${b} | ||||
17 | echo "c=$c" | ||||
18 | c="$b" | ||||
19 | echo "c=$c" | ||||
20 | c="${b}" | ||||
21 | echo "c=$c" | ||||
22 | |||||
23 | echo "Done: $?" |