Quantcast
Channel: Passing a URL with brackets to curl - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Passing a URL with brackets to curl

$
0
0

If I try to pass a URL to curl that contains brackets, it fails with an error:

$ curl 'http://www.google.com/?TEST[]=1'curl: (3) [globbing] illegal character in range specification at pos 29

However, if I escape both brackets, it appears to work:

$ curl 'http://www.google.com/?TEST\[\]=1'

How do I fix this? Is there an argument that will escape URLs automatically, or a description of the characters that need to be escaped before passing to curl?


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>