Re: [gentoo-user] [OT] bash script error

2011-05-10 Thread David Haller
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_opts If I execute

Re: [gentoo-user] [OT] bash script error

2011-05-10 Thread David Haller
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! huff, huff

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread Nils Andresen
Hi, have you tried /bin/bash -x your.script.sh - see what get's expanded ? Nils 2011/5/9 Xi Shen davidshe...@googlemail.com I guess there's something wrong with the argument expansion. Just do not know how to fix it. Please help.

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread Xi Shen
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 n...@nils-andresen.de wrote: Hi, have you tried /bin/bash

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread Kfir Lavi
On Mon, May 9, 2011 at 9:43 AM, Nils Andresen n...@nils-andresen.de wrote: Hi, have you tried /bin/bash -x your.script.sh - see what get's expanded ? Nils 2011/5/9 Xi Shen davidshe...@googlemail.com I guess there's something wrong with the argument expansion. Just do not know how to fix

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread Xi Shen
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 lavi.k...@gmail.com wrote: On Mon, May 9, 2011 at 9:43 AM, Nils Andresen n...@nils-andresen.de wrote: Hi,

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread Xi Shen
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 davidshe...@googlemail.com wrote: yes, i use

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread Pandu Poluan
(Forgive my top-posting) try: curl_opts=-x \'\' Rgds, On 2011-05-09, Xi Shen davidshe...@googlemail.com 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

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread Pandu Poluan
(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 davidshe...@googlemail.com wrote: It is not specific to Gentoo. But do not know where to search or post it :) My script looks like:

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread Xi Shen
i tried that already. not working. i will try the stackoverflow.com. thanks On Mon, May 9, 2011 at 4:31 PM, Pandu Poluan pa...@poluan.info 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

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread Kfir Lavi
On Mon, May 9, 2011 at 12:00 PM, Xi Shen davidshe...@googlemail.com 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 pa...@poluan.info wrote: (Again, sorry for top-posting) BTW, there are lots of bash gurus

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread Alex Schuster
Kfir Lavi writes: On Mon, May 9, 2011 at 12:00 PM, Xi Shen davidshe...@googlemail.com wrote: On Mon, May 9, 2011 at 4:31 PM, Pandu Poluan pa...@poluan.info wrote: On 2011-05-09, Xi Shen davidshe...@googlemail.com wrote: My script looks like: url=http://mypage; curl_opts=-x

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread JDM
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 davidshe...@googlemail.com wrote

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread Kfir Lavi
On Mon, May 9, 2011 at 1:36 PM, Alex Schuster wo...@wonkology.org wrote: Kfir Lavi writes: On Mon, May 9, 2011 at 12:00 PM, Xi Shen davidshe...@googlemail.com wrote: On Mon, May 9, 2011 at 4:31 PM, Pandu Poluan pa...@poluan.info wrote: On 2011-05-09, Xi Shen

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread BRM
in addition to 'man bash'. $0.02 Ben - Original Message From: Xi Shen davidshe...@googlemail.com To: gentoo-user gentoo-user@lists.gentoo.org Sent: Mon, May 9, 2011 1:44:58 AM Subject: [gentoo-user] [OT] bash script error It is not specific to Gentoo. But do not know where

Re: [gentoo-user] [OT] bash script error

2011-05-09 Thread Kevin McCarthy
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 it cannot

[gentoo-user] [OT] bash script error

2011-05-08 Thread Xi Shen
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 it cannot resolve the proxy ''. But If I modify the script to: