vendredi 8 février 2019

Using output from curl post with IF ELSE statements

I want to run a bat file that checks the output of curl request and when the condition is met act accordingly.

the curl request in a bat file is as follows: curl --insecure -X POST https://api.zilliqa.com/ -H "Content-type: application/json" --data "{\"id\":\"1\", \"jsonrpc\":\"2.0\", \"method\":\"GetNumTxBlocks\", \"params\":"[""]"}"

and the the result is numeric, growing all the time. As complete newbie i can not figure out how to proceed. please give me advice, best if you could provide with example as well.

I want the IF statement to react when the last two digits of the result are greater than 95. is that also doable? for now the result is 4 digit number but will grow and be 5 then 6 digit number.

hope it is possible. if not, please suggest a possible solution.

Aucun commentaire:

Enregistrer un commentaire