Hide status output from jq in dos / windows

I am using curl for windows ( http://www.confusedbycode.com/curl/ ) in combination with jq ( http://stedolan.github.io/jq/ ) to interact with the web api via a batch file. Apparently the simple problem I am having is that no matter what I do, I cannot suppress the "JQ" status output. In particular, it always prints the "execution status", for example:

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100   116  100    99  100    17    908    155 --:--:-- --:--:-- --:--:--   908

      

Simplified example of a batch file:

@echo off
@curl.exe -H "Content-Type: application/json" -d '{\"cmd\":\"login\"}' http://localhost:80/json | jq -r .session > sess.txt

      

Note that jq works as expected - I just need to get it to work silently. It seems like ignore @echo is off and I couldn't find any switches in the manual to turn this output off.

Any ideas ...?

Thanks a lot in advance :)

+3


source to share


1 answer


curl --silent

      

-s, --silent
  Silent or quiet mode. Do not show progress meter or error messages. Makes Curl
  mute.


+5


source







All Articles