Hello,
On Mon, 09 May 2011, JDM wrote:
>Do as you tried first, but add an eval:
>eval curl "$url" -d \"mydata\" $curl_opts
eval is evil ...
-dnh
--
"Being disintegrated makes me ve-ry an-gry!"
Hello,
On Mon, 09 May 2011, Kevin McCarthy wrote:
>On Mon, May 09, 2011 at 01:44:58PM +0800, Xi Shen wrote:
>> It is not specific to Gentoo. But do not know where to search or post it :)
>>
>> My script looks like:
>>
>> url="http://mypage";
>> curl_opts="-x ''"
>> curl $url -d \"mydata\" $curl_
On Mon, May 09, 2011 at 01:44:58PM +0800, Xi Shen wrote:
> It is not specific to Gentoo. But do not know where to search or post it :)
>
> My script looks like:
>
> url="http://mypage";
> curl_opts="-x ''"
> curl $url -d \"mydata\" $curl_opts
>
> If I execute it, I got an error from curl, saying
Well, I saw a lot of advice on this but no real solution - just some debugging
help.
At least from my own experience with Bash Scripting, I find that you can never
use enough braces when referencing variables.
So, the script should read:
url="http://mypage";
curl_opts="-x"
curl ${url} -d \"myd
On Mon, May 9, 2011 at 1:36 PM, Alex Schuster wrote:
> Kfir Lavi writes:
>
> > On Mon, May 9, 2011 at 12:00 PM, Xi Shen
> > wrote:
>
> > > On Mon, May 9, 2011 at 4:31 PM, Pandu Poluan
> wrote:
>
> > > > On 2011-05-09, Xi Shen wrote:
>
> > > >> My script looks like:
> > > >>
> > > >> url="http:
He
--Original Message--
From: Alex Schuster
To: gentoo-user@lists.gentoo.org
ReplyTo: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] [OT] bash script error
Sent: 9 May 2011 11:36
Kfir Lavi writes:
> On Mon, May 9, 2011 at 12:00 PM, Xi Shen
> wrote:
> > On Mon, Ma
Kfir Lavi writes:
> On Mon, May 9, 2011 at 12:00 PM, Xi Shen
> wrote:
> > On Mon, May 9, 2011 at 4:31 PM, Pandu Poluan wrote:
> > > On 2011-05-09, Xi Shen wrote:
> > >> My script looks like:
> > >>
> > >> url="http://mypage";
> > >> curl_opts="-x ''"
> > >> curl $url -d \"mydata\" $curl_opt
On Mon, May 9, 2011 at 12:00 PM, Xi Shen wrote:
> i tried that already. not working. i will try the stackoverflow.com.
> thanks
>
>
> On Mon, May 9, 2011 at 4:31 PM, Pandu Poluan wrote:
> > (Again, sorry for top-posting)
> >
> > BTW, there are lots of bash gurus in stackovervlow.com. My handle
>
i tried that already. not working. i will try the stackoverflow.com. thanks
On Mon, May 9, 2011 at 4:31 PM, Pandu Poluan wrote:
> (Again, sorry for top-posting)
>
> BTW, there are lots of bash gurus in stackovervlow.com. My handle
> there is 'pepoluan'.
>
> Rgds,
>
>
> On 2011-05-09, Xi Shen wr
(Again, sorry for top-posting)
BTW, there are lots of bash gurus in stackovervlow.com. My handle
there is 'pepoluan'.
Rgds,
On 2011-05-09, Xi Shen wrote:
> It is not specific to Gentoo. But do not know where to search or post it :)
>
> My script looks like:
>
> url="http://mypage";
> curl_opts
(Forgive my top-posting)
try:
curl_opts="-x \'\'"
Rgds,
On 2011-05-09, Xi Shen wrote:
> yes, i use the '-x' option, and i can see the expansion now. and i
> found there are too many quotes.
>
> i tried curl_opts=-x "", does not work.
>
>
> On Mon, May 9, 2011 at 3:52 PM, Kfir Lavi wrote:
>>
if i use -x '', or -x "", it expands to -x. the quotes are removed as
they are empty.
if i use -x \'\', the expanded quotes are quoted again...resulting too
many quotes
it is driving me crazy o_O! please help.
On Mon, May 9, 2011 at 4:14 PM, Xi Shen wrote:
> yes, i use the '-x' option, and i c
yes, i use the '-x' option, and i can see the expansion now. and i
found there are too many quotes.
i tried curl_opts=-x "", does not work.
On Mon, May 9, 2011 at 3:52 PM, Kfir Lavi wrote:
>
>
> On Mon, May 9, 2011 at 9:43 AM, Nils Andresen wrote:
>>
>> Hi,
>> have you tried "/bin/bash -x your
On Mon, May 9, 2011 at 9:43 AM, Nils Andresen wrote:
> Hi,
> have you tried "/bin/bash -x your.script.sh" - see what get's expanded ?
>
> Nils
>
>
> 2011/5/9 Xi Shen
>
>> I guess there's something wrong with the argument expansion. Just do
>> not know how to fix it. Please help.
>>
>> You need t
yes, you are right.
+ curl_opts='-x '\'''\'''
the "-x ''" expands to too many quotes. I tried to replace the
double-quotes to single-quotes, but still not working.
any idea how to fix this?
On Mon, May 9, 2011 at 2:43 PM, Nils Andresen wrote:
> Hi,
> have you tried "/bin/bash -x your.script.s
Hi,
have you tried "/bin/bash -x your.script.sh" - see what get's expanded ?
Nils
2011/5/9 Xi Shen
> I guess there's something wrong with the argument expansion. Just do
> not know how to fix it. Please help.
>
>
16 matches
Mail list logo