I have a problem with comparing 2 variables (one variable is read from file).
  1 #!/bin/bash
  2
  3 CFR=$(<bubble_status.txt)
  4 treshold=0.01
  5 echo $CFR
  6 echo $treshold
  7
  8 if [ "$CFR" -gt "$treshold" ]
  9 then
 10         echo "CFR is greater then treshold";
 11 elif [ "$CFR" -lt "$treshold" ]
 12 then
 13         echo "CFR is less than treshold";
 14 else
 15         echo "Something else";
 16 fi
But bash returns me this:
19.81
0.01
./dupa7.sh: line 8: [: 19.81: integer expression expected
./dupa7.sh: line 11: [: 19.81: integer expression expected
Something else
Any ideas?
 
     
    