I try to write simple script to read temperature:
cpu=$(cat /sys/class/thermal/thermal_zone*/temp)
if [$cpu -ge 50000]; then
echo "OK"
else
echo "Not OK"
fi
echo $cpu is fine: 64000 but script output is:
myscript.sh: 2: [64000: not found
Not OK
What is wrong with line 2? Thank You.