Re: ftp using a configuration file
Date: Sat, 8 Sep 2007 22:28:41 +0200 (CEST)
On Fri, 7 Sep 2007, Chris Glon wrote:
> Is it possible to emulate Unix "ftp -n < instruction file", where the
> insruction file contains all the different parameters necessary to perform
> an ftp operation: Host name, user, pwd, upload directory, file name to
> upload, ...
Most of those options are normally given in a single URL to curl. A few others
are given with other command line options.
> Reading the manual, it sounds that -K may be the option to use, but how?
-K takes a file from which it reads further command line options from.
curl -K config
and within the file "config" you can lines written in this style:
--- start ---
url = "http://moo.moo.moo/
-d "post data"
--- end ---
You can specify the command line options with dash, the long names with double
dashes or you can specify the long names without dashes. The important thing
is that the argument for each option must be given on the same physical line.
You can add comments with lines starting with # and you can have empty lines.
> And what is the best way in that case to monitor what is going on between
> the 2 servers: -v?
Yes, or --trace or --trace-ascii if you want even more details.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-09-08