So I'm curling a json file and parsing it. The result is a number. Each one of these functions outputs a different number. I want the output in a Math equation, that's gonna go in IF statements.
function func() {
curl -Ss -H 'Cache-Control: no-cache' url.com | jq -r '.[] | .[] |
.interger'
}
function func2() {
curl -Ss -H 'Cache-Control: no-cache' url.com | jq -r '.[] | .[] |
.interger'
}
function func3() {
curl -Ss -H 'Cache-Control: no-cache' url.com | jq -r '.[] | .[] |
.interger'
}
if func*func2*func3 / func2*func3*func -ge 1
then
echo "yay"
fi
if func*func2*func3 / func2*func3*func -lt 1
then
echo "nay"
fi
Currently It is not doing any type of multiplication or division on the if statement, therefore making statement obsolete.
So far I've tried:
if [func*func2*func3 / func2*func3*func -ge 1]
then
echo "yay"
fi
if [func*func2*func3 / func2*func3*func -lt 1]
then
echo "nay"
fi