如何包括一个'和;'字符在bash卷曲声明 [英] How to include an '&' character in a bash curl statement
本文介绍了如何包括一个'和;'字符在bash卷曲声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图用卷曲在bash下载网页,但&安培;
在URL符号不是PTED作为一个字符作为跨$ P $我想要。我如何能说服bash的任何想法,符号&放大器;
只是一个无聊的角色并没有什么特别之处。
I'm trying to use curl in bash to download a webpage, but the &
symbol in the URL isn't interpreted as a character as I would like. Any ideas on how I can convince bash that the symbol &
is just a boring character and nothing special?
推荐答案
把单引号括起来的&安培;
符号似乎工作。也就是说,使用URL像 http://www.example.com/page.asp?arg1=$ {I}'和;'ARG2 = $ {Ĵ}
卷曲返回请求的网页。
Putting single quotes around the &
symbol seems to work. That is, using a URL like http://www.example.com/page.asp?arg1=${i}'&'arg2=${j}
with curl returns the requested webpage.
这篇关于如何包括一个'和;'字符在bash卷曲声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文