How to include an '&' character in a bash curl statement

前端 未结 7 1214
萌比男神i
萌比男神i 2020-11-28 09:14

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

7条回答
  •  庸人自扰
    2020-11-28 09:28

    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.

提交回复
热议问题