1 Long: output 2 Arg: <file> 3 Short: o 4 Help: Write to file instead of stdout 5 See-also: remote-name remote-name-all remote-header-name 6 Category: important curl 7 --- 8 Write output to <file> instead of stdout. If you are using {} or [] to fetch 9 multiple documents, you should quote the URL and you can use '#' followed by a 10 number in the <file> specifier. That variable will be replaced with the current 11 string for the URL being fetched. Like in: 12 13 curl "http://{one,two}.example.com" -o "file_#1.txt" 14 15 or use several variables like: 16 17 curl "http://{site,host}.host[1-5].com" -o "#1_#2" 18 19 You may use this option as many times as the number of URLs you have. For 20 example, if you specify two URLs on the same command line, you can use it like 21 this: 22 23 curl -o aa example.com -o bb example.net 24 25 and the order of the -o options and the URLs doesn't matter, just that the 26 first -o is for the first URL and so on, so the above command line can also be 27 written as 28 29 curl example.com example.net -o aa -o bb 30 31 See also the --create-dirs option to create the local directories 32 dynamically. Specifying the output as '-' (a single dash) will force the 33 output to be done to stdout. 34