0

Can anyone give any suggestion why this error is occurring ?

cmd curl command

curl https://xyz.com/Dash.aspx?nl=Gas%20Daily&nl2=Home

Error

nl2 is not recognized as an an internal or external command, operable program or batch file

I have also tried

curl https://xyz.com/Dash.aspx?nl=Gas%20Daily'&'nl2=Home

But still the same error

Sal00m
  • 2,938
  • 3
  • 22
  • 33
  • 1
    You're encountering some kind of shell escaping issue. Given that curl is multi-platform, please indicate which OS/shell you're actually working with. – Damien_The_Unbeliever Jul 03 '14 at 09:23
  • possible duplicate of [Escaping curl command in Windows](http://stackoverflow.com/questions/14966989/escaping-curl-command-in-windows) – Paul Sweatte Oct 30 '14 at 18:20
  • @PaulSweatte I don't think this is a duplicate, as that other question (despite the title) turned out to be a problem with setting the correct request header, not an escaping problem. – Jeen Broekstra Oct 30 '14 at 23:34

1 Answers1

0

As mentioned in the comments, it's an escaping issue. Try enclosing the URL in quotes, like so:

curl 'https://xyz.com/Dash.aspx?nl=Gas%20Daily&nl2=Home'
Jeen Broekstra
  • 21,642
  • 4
  • 51
  • 73