Wget输出文档和标头到STDOUT [英] Wget output document and headers to STDOUT
本文介绍了Wget输出文档和标头到STDOUT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试通过wget -S -O - http://google.com
但它仅显示html文档.
but it shows only html docment.
谢谢
UPD:
曾为此工作wget --save-headers --output-document - http://google.com
wget --version
显示了已修改的GNU Wget 1.11.4 Red Hat
wget --version
shows GNU Wget 1.11.4 Red Hat modified
推荐答案
尝试以下操作,不要使用多余的标题
Try the following, no extra headers
wget -qO- www.google.com
请注意结尾的-
.这是-O
引导到文件的常规命令参数的一部分,但是由于我们不使用>
定向到文件,因此它进入了外壳.您可以使用-qO-
或-qO -
.
Note the trailing -
. This is part of the normal command argument for -O
to cat out to a file, but since we don't use >
to direct to a file, it goes out to the shell. You can use -qO-
or -qO -
.
这篇关于Wget输出文档和标头到STDOUT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文