output.d 1.1 KB

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