转义“#”符号
我正在尝试将 wget 与包含“#”符号的 url 一起使用。无论我做什么来逃避这个角色,都是行不通的。我用过 \、' 和 "。但是它们都不起作用。有人有任何建议吗?
谢谢!
I am trying to use wget with a url that includes a "#" sign. No matter what I do to escape the character, it doesn't work. I've used \, ', and ". But none of them work. Does any one have any suggestions?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您确实想让它有一个哈希值,请将其发送为 %23。如果您尝试发送片段,请不要打扰,因为服务器无论如何都不会关心它。
Send it as %23 if you really mean for it to have a hash. If you're trying to send a fragment, don't bother since the server won't care about it regardless.
也许将 uri 放在
''
周围?我相信它有效maybe put uri around
''
? I believe it works你引用的是网址吗?如果你是的话,这应该不成问题。
我的猜测是你正在做类似的事情:
而不是:
#
是 shell 脚本注释字符。Are you quoting the url? It shouldn't be a problem if you are.
My guess is you're doing something like:
Instead of:
#
is the shell script comment character.