curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Issues with output

From: Ray Satiro via curl-users <curl-users_at_lists.haxx.se>
Date: Tue, 13 Jun 2023 03:26:21 -0400

On 6/12/2023 7:08 PM, TD via curl-users wrote:
> The config file has an output file specified as part of the config
> file, so I thought that all the output for the site would be sent to
> the file, and the output from -w with the stats would then go to
> stdout, which I redirect in append mode. This works on the command
> line with a single curl command and the config file set in the command
> line. It also works with multiple curl commands, if I use the -o
> option on the command line set with a variable (-o $site.out), and
> then redirect the stdout to a second file for the stats.


Please don't top-post [1], it makes the conversation harder to follow.

Possibly your configuration file is not in the right format [2].

Try this:

~~~
rm list

for x in {a..c}; do
cat << EOF > $x.cfg
url = "http://mockbin.com/echo"
data = "data_$x\n"
output = "$x.out"
EOF
echo $x.cfg >> list
done

cat list | parallel -P1 curl --config {}

for x in {a..c}; do cat $x.out; done
~~~

You should see:
data_a
data_b
data_c

If you get the above results and have followed the format please give us
a minimal self contained example that we can use to reproduce.


[1]: https://curl.se/mail/etiquette.html#Do_Not_Top_Post
[2]: https://curl.se/docs/manpage.html#-K

-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-06-13