“wget -O"是什么意思?意思? [英] What does "wget -O" mean?

查看:95
本文介绍了“wget -O"是什么意思?意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 shell 脚本中有一个像这样的 wget 命令:

I have an wget command like this in my shell script:

reponse="`wget -O- http:localhost:8080/app/index.html`"

我不明白 -O- 选项.我被解释说 -O 输出到某个地方, - 输出到当前流.我在 wget 中没有看到对-"的任何解释.这是shell脚本的标准吗?在哪里可以找到参考资料?

I don't understand the -O- option. I was explained that -O is output to somewhere and - is output to the current stream. I don't see any explaination of "-" in wget. Is that a standard thing for shell scripting. Where I can find reference to it?

谢谢,

推荐答案

这是 wget -O 的手册页:

Here's the man page of wget -O:

http://www.gnu.org/software/wget/manual/html_node/Download-Options.html#Download-Options

这里有几个例子:

  1. 没有标志的wget

wget www.stackoverflow.com

输出:

名为 index.html 的文件

A file named as index.html

带有 -O 标志的 wget

wget -O filename.html www.stackoverflow.com

输出:

名为 filename.html 的文件

A file named as filename.html

带有 -O- 标志的 wget

wget -O- www.stackoverflow.com

输出:

输出到标准输出

这篇关于“wget -O"是什么意思?意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆