1cee0338be80bb81b15101686d6f60864455f1e6eElliott HughesLong: output
2cee0338be80bb81b15101686d6f60864455f1e6eElliott HughesArg: <file>
3cee0338be80bb81b15101686d6f60864455f1e6eElliott HughesShort: o
4cee0338be80bb81b15101686d6f60864455f1e6eElliott HughesHelp: Write to file instead of stdout
5cee0338be80bb81b15101686d6f60864455f1e6eElliott HughesSee-also: remote-name remote-name-all remote-header-name
6cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes---
7cee0338be80bb81b15101686d6f60864455f1e6eElliott HughesWrite output to <file> instead of stdout. If you are using {} or [] to fetch
8cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughesmultiple documents, you can use '#' followed by a number in the <file>
9cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughesspecifier. That variable will be replaced with the current string for the URL
10cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughesbeing fetched. Like in:
11cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes
12cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes curl http://{one,two}.example.com -o "file_#1.txt"
13cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes
14cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughesor use several variables like:
15cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes
16cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes curl http://{site,host}.host[1-5].com -o "#1_#2"
17cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes
18cee0338be80bb81b15101686d6f60864455f1e6eElliott HughesYou may use this option as many times as the number of URLs you have. For
19cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughesexample, if you specify two URLs on the same command line, you can use it like
20cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughesthis:
21cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes
22cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes  curl -o aa example.com -o bb example.net
23cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes
24cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughesand the order of the -o options and the URLs doesn't matter, just that the
25cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughesfirst -o is for the first URL and so on, so the above command line can also be
26cee0338be80bb81b15101686d6f60864455f1e6eElliott Hugheswritten as
27cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes
28cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes  curl example.com example.net -o aa -o bb
29cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughes
30cee0338be80bb81b15101686d6f60864455f1e6eElliott HughesSee also the --create-dirs option to create the local directories
31cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughesdynamically. Specifying the output as '-' (a single dash) will force the
32cee0338be80bb81b15101686d6f60864455f1e6eElliott Hughesoutput to be done to stdout.
33