I referred to multiple articles to solve my problem but no luck. I'm trying curl inside if; as the value comparison is an arithmetic operation, I'm using the > operator with ((.
However, the command is failing with error
bash: ((: > 0: syntax error: operand expected (error token is "> 0")
Here is my command:
if (( $(curl --max-time 10 $serviceName) > 0)); then echo ERROR ; fi
What is wrong in the command?
Aucun commentaire:
Enregistrer un commentaire