Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usingcurl/verbose/writeout.md: add output section #305

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions usingcurl/verbose/writeout.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ whitespace trimmed. Like this:

curl -w "Server: %header{server}\n" http://example.com

## Output

By default, this option makes the selected data get output on stdout. If that
is not good enough, the pseudo-variable ` %{stderr}` can be used to direct
(the following) part to stderr and `%{stdout}` brings it back to stdout.

From curl 8.3.0, there is a feature that lets users send the write-out output
to a file: `%output{filename}`. The data following will then be written to
that file. If you rather have curl append to that file instead of creating it
from scratch, prefix the file name with `>>`. Like this:
`%output{>>filename}`.

A write-out argument can include output to stderr, stdout and files as the
user sees fit.

## Windows

**NOTE:** In Windows, the `%`-symbol is a special symbol used to expand
Expand Down
Loading