I am new to batch scripting. I am trying to create a batch wrapper script which uses curl to get HTTP code for a site
The curl command works in CMD:
curl -s -w "%{http_code}" https://www.sample.com/
However, if I put this in a batch script, it throws an error:
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
Below is the batch script:
ECHO OFF
curl -s -w "%{http_code}" https://www.sample.com/
Is there anything I am doing wrong. Please advise.