From e431daf013ea04cb1a988a2009d820224ef5fb79 Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Mon, 8 Oct 2018 23:54:01 +0200 Subject: curl: add %{stderr} and %{stdout} for --write-out Closes #3115 --- docs/TODO | 9 --------- docs/cmdline-opts/write-out.d | 12 ++++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/TODO b/docs/TODO index 3b1b53d88..18d39c6b1 100644 --- a/docs/TODO +++ b/docs/TODO @@ -150,7 +150,6 @@ 18.8 offer color-coded HTTP header output 18.9 Choose the name of file in braces for complex URLs 18.10 improve how curl works in a windows console window - 18.11 -w output to stderr 18.12 keep running, read instructions from pipe/socket 18.13 support metalink in http headers 18.14 --fail without --location should treat 3xx as a failure @@ -1014,14 +1013,6 @@ that doesn't exist on the server, just like --ftp-create-dirs. window, the transfer is interrupted and can get disconnected. This can probably be improved. See https://github.com/curl/curl/issues/322 -18.11 -w output to stderr - - -w is quite useful, but not to those of us who use curl without -o or -O - (such as for scripting through a higher level language). It would be nice to - have an option that is exactly like -w but sends it to stderr - instead. Proposed name: --write-stderr. See - https://github.com/curl/curl/issues/613 - 18.12 keep running, read instructions from pipe/socket Provide an option that makes curl not exit after the last URL (or even work diff --git a/docs/cmdline-opts/write-out.d b/docs/cmdline-opts/write-out.d index 3747845cc..2fc0ff21a 100644 --- a/docs/cmdline-opts/write-out.d +++ b/docs/cmdline-opts/write-out.d @@ -15,6 +15,9 @@ text that curl thinks fit, as described below. All variables are specified as output a newline by using \\n, a carriage return with \\r and a tab space with \\t. +The output will be written to standard output, but this can be switched to +standard error by using %{stderr}. + .B NOTE: The %-symbol is a special symbol in the win32-environment, where all occurrences of % must be doubled when using this option. @@ -103,6 +106,15 @@ second. The result of the SSL peer certificate verification that was requested. 0 means the verification was successful. (Added in 7.19.0) .TP +.B stderr +From this point on, the --write-out output will be written to standard +error. (Added in 7.63.0) +.TP +.B stdout +From this point on, the --write-out output will be written to standard output. +This is the default, but can be used to switch back after switching to stderr. +(Added in 7.63.0) +.TP .B time_appconnect The time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed. (Added in 7.19.0) -- cgit v1.2.3