I'm using curl for windows (http://www.confusedbycode.com/curl/) in conjunction with jq (http://stedolan.github.io/jq/) to interact with a web api via a batch file. The seemingly simple problem I'm having is that no matter what I do, I cannot seem to suppress JQ's "status" output. In particular, it always outputs "progress status," like:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 116 100 99 100 17 908 155 --:--:-- --:--:-- --:--:-- 908
A simplified example batch file would be:
@echo off
@curl.exe -H "Content-Type: application/json" -d '{\"cmd\":\"login\"}' http://localhost:80/json | jq -r .session > sess.txt
Note that jq does operate as expected - I simply need to get it to operate silently. It seems to ignore @echo off, and I couldn't find any switches in the manual to disable this output.
Any ideas...?
Thanks much in advance :)
curl --silent
-s, --silent Silent or quiet mode. Do not show progress meter or error messages. Makes Curl mute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With