Você está usando os scripts -lt
e -gt
in bc
, mas estes não são operadores em bc
. Substitua todas as ocorrências de -lt
e -gt
por <
e >
, respectivamente.
if (( $(echo "scale=4; $si > $six" | bc -l) )) && (( $(echo "scale=4; $il > $six" | bc -l) ))
then
echo "Value is a"
elif (( $(echo "scale=4; $si < $six" | bc -l) ))
then
echo "Value is b"
elif (( $(echo "scale=4; $il < $six" | bc -l) ))
then
echo "Value is c"
else
echo "Value is d"
fi
Além disso, a primeira condição pode ser combinada usando um único bc
:
if (( $(echo "scale=4; $si > $six && $il > $six" | bc -l) ))