如何将 cURL 输出捕获到文件? [英] How to capture cURL output to a file?
本文介绍了如何将 cURL 输出捕获到文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个包含一堆这种格式的 URL 的文本文档:
I have a text document that contains a bunch of URLs in this format:
URL = "sitehere.com"
我想要做的是运行 curl -K myfile.txt
,并将响应 cURL 返回的输出放入一个文件中.
What I'm looking to do is to run curl -K myfile.txt
, and get the output of the response cURL returns, into a file.
我该怎么做?
推荐答案
curl -K myconfig.txt -o output.txt
写入在您指定的文件中接收到的第一个输出(如果存在旧的则覆盖).
Writes the first output received in the file you specify (overwrites if an old one exists).
curl -K myconfig.txt >> output.txt
将您收到的所有输出附加到指定的文件中.
Appends all output you receive to the specified file.
注意:-K 是可选的.
这篇关于如何将 cURL 输出捕获到文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文