1 |
On Sun, Jan 03, 2010 at 02:56:01AM +0100, Tomáš Chvátal wrote: |
2 |
> Dne 3.1.2010 01:56, Mark Bateman napsal(a): |
3 |
> > There seems to be alot of unquoted variables |
4 |
> > |
5 |
> > 65 base_src_util $@ |
6 |
> This is not problem |
7 |
|
8 |
Only because you can be sure there will be exactly one word in the |
9 |
result, which will not be split. In general, $@ should be quoted, and it |
10 |
would be a good idea to either do it here too even though it's not |
11 |
strictly necessary, or make the intent clearer and just write |
12 |
|
13 |
base_src_util $1 |
14 |
|
15 |
> > 90 case $1 in |
16 |
> Yarp this is problem and fixed |
17 |
|
18 |
That's not a problem. A case expression is another example where quoting |
19 |
is unnecessary; there won't be any word splitting on $1 anyway. |
20 |
|
21 |
> > 95 [[ ! -z "${A}" ]] && unpack ${A} |
22 |
> ${A} is not used quoted :] |
23 |
|
24 |
Right, that doesn't need quoting, and it would even be okay to drop the |
25 |
unnecessary quotes in [[. |