cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Re: -Q and bash

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 19 Dec 2008 22:48:54 -0800

On Fri, Dec 19, 2008 at 07:52:58PM -0800, K Seb wrote:
> I've had some issues using the --quote option with bash. I'd like to send the
> command CWD to change directories on my server but it seems that when using
> bash, curl does not see the argument I'm sending with the command.
>
> ie:
>
> DVR_CWD="curl --trace-ascii \"-\" -ns ftp://192.168.2.104/ --quote \"CWD
> Jul.31.2008\"";
> echo $DVR_CWD > /root/DVRCWD
> $(tail < /root/DVRCWD)

The $() command substitution doesn't do the full shell interpretation of the
argument. Replace the last line with:

 eval $(tail < /root/DVRCWD)

to do what you want.

But on another note, it's not a good idea to put CWD in a quote command
unless absolutely necessary, since it messes up the synchronization between
the server's CWD and curl's internal idea of the CWD. You coudl just as
easily accomplish the same with:

  curl --trace-ascii - -ns ftp://192.168.2.104/Jul.31.2008/

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2008-12-20

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET