cURL无法使用包含括号的网址

hau*_*nja 4 curl

当我传递包含括号的URL时,cURL请求失败(例如,在下面的Wikipedia链接中).

sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `curl -g --silent --max-time 5 --location http://en.wikipedia.org/wiki/Curl_(disambiguation)'
Run Code Online (Sandbox Code Playgroud)

我已阅读过手册页,但我找不到任何相关内容.有没有办法解决?

小智 10

使用双引号:

curl -g --silent --max-time 5 --location "http://en.wikipedia.org/wiki/Curl_(disambiguation)"
Run Code Online (Sandbox Code Playgroud)