I'm writing a script and part of it outputs a number $stats i.e 74.9 and if it's less than 100 it's a fail if not it's a pass. I've tried
do stuff
done
echo $stats
if [ $stats -gt 100 ]; then
echo "PASS"
else
echo "FAIL"
fi
but it fails with
72.4
./runme.sh: line 66: [: 72.4: integer expression expected
FAIL
Aucun commentaire:
Enregistrer un commentaire