Denys Vlasenko | e298ce6 | 2010-09-04 19:52:44 +0200 | [diff] [blame] | 1 | # Test for correct handling of backslashes |
| 2 | a=qwerty |
| 3 | |
Denys Vlasenko | 101a4e3 | 2010-09-09 14:04:57 +0200 | [diff] [blame] | 4 | b=-$a-\t-\\-\"-\`-\--\z-\*-\?- |
Denys Vlasenko | e298ce6 | 2010-09-04 19:52:44 +0200 | [diff] [blame] | 5 | echo b1=$b |
| 6 | echo "b1=$b" |
Denys Vlasenko | 101a4e3 | 2010-09-09 14:04:57 +0200 | [diff] [blame] | 7 | b="-$a-\t-\\-\"-\`-\--\z-\*-\?-" |
Denys Vlasenko | e298ce6 | 2010-09-04 19:52:44 +0200 | [diff] [blame] | 8 | echo b2=$b |
| 9 | echo "b2=$b" |
Denys Vlasenko | 101a4e3 | 2010-09-09 14:04:57 +0200 | [diff] [blame] | 10 | b='-$a-\t-\\-\"-\`-\--\z-\*-\?-' |
Denys Vlasenko | e298ce6 | 2010-09-04 19:52:44 +0200 | [diff] [blame] | 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: $?" |