]>
Commit | Line | Data |
---|---|---|
8868edaf CR |
1 | # This program is free software: you can redistribute it and/or modify |
2 | # it under the terms of the GNU General Public License as published by | |
3 | # the Free Software Foundation, either version 3 of the License, or | |
4 | # (at your option) any later version. | |
5 | # | |
6 | # This program is distributed in the hope that it will be useful, | |
7 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
8 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
9 | # GNU General Public License for more details. | |
10 | # | |
11 | # You should have received a copy of the GNU General Public License | |
12 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
13 | # | |
d233b485 CR |
14 | set -- 1 2 |
15 | ||
16 | unset var | |
17 | recho ${var-$@} | |
18 | recho ${var-"$@"} | |
19 | recho ${var-$*} | |
20 | recho ${var-"$*"} | |
21 | ||
22 | unset -v a b c d | |
23 | recho ${a=$@} | |
24 | recho "$a" | |
25 | recho ${b="$@"} | |
26 | recho "$b" | |
27 | recho ${c=$*} | |
28 | recho "$c" | |
29 | recho ${d="$*"} | |
30 | recho "$d" | |
31 | ||
32 | IFS= | |
33 | unset var | |
34 | recho ${var-$@} | |
35 | recho ${var-"$@"} | |
36 | recho ${var-$*} | |
37 | recho ${var-"$*"} | |
38 | ||
39 | unset -v a b c d | |
40 | # Posix interp 221 | |
41 | # there should never be any word splitting because IFS is null | |
42 | recho ${a=$@} | |
43 | recho "$a" | |
44 | recho $a | |
45 | recho ${b="$@"} | |
46 | recho "$b" | |
47 | recho $b | |
48 | recho ${c=$*} | |
49 | recho "$c" | |
50 | recho $c | |
51 | recho ${d="$*"} | |
52 | recho "$d" | |
53 | recho $d | |
54 | ||
55 | unset -v a b c d | |
56 | a=$@ | |
57 | recho $a | |
58 | b="$@" | |
59 | recho $b | |
60 | c=$* | |
61 | recho $c | |
62 | d="$*" | |
63 | recho $d | |
64 | ||
65 | unset -v parameter a b c d |