Wget 将我的 URL 地址的某些部分识别为语法错误
我对 wget
还很陌生,我已经在 Google 上进行了研究,但没有找到任何线索。
我需要保存网页的单个 HTML 文件:
wget yahoo.com -O test.html
它可以工作,但是,当我尝试更具体时:
wget http://search.yahoo.com/404handler?src=search&p=food+delicious -O test.html
问题来了,wget
识别 &p=food+delicious
作为一种语法,它说:'p' 未被识别为内部或外部命令
我该如何解决这个问题?我非常感谢您的建议。
I am quite new with wget
and I have done my research on Google but I found no clue.
I need to save a single HTML file of a webpage:
wget yahoo.com -O test.html
and it works, but, when I try to be more specific:
wget http://search.yahoo.com/404handler?src=search&p=food+delicious -O test.html
here comes the problem, wget
recognizes &p=food+delicious
as a syntax, it says: 'p' is not recognized as an internal or external command
How can I solve this problem? I really appreciate your suggestions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
&
在 shell 中具有特殊含义。使用\
转义或将 url 放在引号中以避免此问题。或者
在许多 Unix shell 中,在命令后面添加
&
会导致其变为 在后台执行。The
&
has a special meaning in the shell. Escape it with\
or put the url in quotes to avoid this problem.or
In many Unix shells, putting an
&
after a command causes it to be executed in the background.将 URL 用单引号引起来以避免此问题。
IE
Wrap your URL in single quotes to avoid this issue.
i.e.
如果你使用的是 jubyter 笔记本,也许
在从 URL 扭曲之前检查你是否已经下载
if you are using a jubyter notebook, maybe check if you have downloaded
before warping from URL