cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: More whitespace escaping commandline

From: Alex Bligh <alex_at_alex.org.uk>
Date: Thu, 3 Apr 2014 15:28:20 +0100

On 3 Apr 2014, at 15:09, Rasmus Olsen wrote:

> #!/bin/sh
> CMD="curl -s -f --show-error --ftp-create-dirs -T $1 -u $2:$3 $4"
> $CMD 2>&1

What if you try

#!/bin/sh
CMD=curl
$CMD -s -f --show-error --ftp-create-dirs -T "$1" -u "$2:$3" "$4"

-- 
Alex Bligh
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-04-03