Allow --write-out output to be written to a file #11400
Replies: 5 comments 2 replies
-
I think this sounds like a great idea! |
Beta Was this translation helpful? Give feedback.
-
See #11416 |
Beta Was this translation helpful? Give feedback.
-
Why would this need to handle all the mess involved in creating files?
and then the usual tools can redirect/append that file descriptor any way you want. |
Beta Was this translation helpful? Give feedback.
-
This can be closed I think; curl 8.3.0 allows |
Beta Was this translation helpful? Give feedback.
-
Yeps, this is now implemented and shipped. |
Beta Was this translation helpful? Give feedback.
-
I would find it useful to have a way to cause the
--write-out
output of the curl tool to be written to a file instead of stdout or stderr which may both be in use for other purposes.One way to achieve this might be new format variables such as
file=<name>
causing subsequent output to overwrite the file at<name>
andfile+=<name>
causing subsequent output to be appended to the file at<name>
.Example use case:
curl --progress-meter --write-out '%{file=out.json}%{json}' --url 'https://example.com/large_file' | tee large_file | sha256sum > large_file.sha256
I suspect there's a workaround on Linux involving
mkfifo
, but I don't believe a similar CLI tool is available on Windows.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions