如何捕获Curl输出到文件? [英] How to capture Curl output to a file?
本文介绍了如何捕获Curl输出到文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个文本文档,其中包含一堆采用以下格式的网址:
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
写入指定文件中收到的 first 输出(如果存在旧文件,则覆盖该文件).
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屋!
查看全文