1 |
On Mon, May 09, 2011 at 01:44:58PM +0800, Xi Shen wrote: |
2 |
> It is not specific to Gentoo. But do not know where to search or post it :) |
3 |
> |
4 |
> My script looks like: |
5 |
> |
6 |
> url="http://mypage" |
7 |
> curl_opts="-x ''" |
8 |
> curl $url -d \"mydata\" $curl_opts |
9 |
> |
10 |
> If I execute it, I got an error from curl, saying it cannot resolve |
11 |
> the proxy ''. |
12 |
> |
13 |
|
14 |
While bash arrays probably aren't required for this, the following seems |
15 |
to work OK: |
16 |
|
17 |
curl_opts=(-x "") |
18 |
curl $url -d \"mydata\" "${curl_opts[@]}" |
19 |
|
20 |
But I'm sure there's a quotes-only solution, too. |
21 |
|
22 |
-- |
23 |
Kevin McCarthy <signals@g.o> |