# 当设备温度超过阈值时通过'notify-send'通知用户的程序。
#!/bin/bash
Temp=adb shell cat /sys/devices/platform/omap/omap_temp_sensor.0/temperature
if [ $Temp -gt 42000 ]
then
notify-send Temperature "$Temp " -i /usr/share/pixmaps/idle.xpm
cvlc /home/Xme/Desktop/Beep-263732.mp3
else
echo "Exit"
fi
得到错误为
: integer expression expected
我没有得到$Temp的数据类型,它正在通过设备读取数据,我如何比较整数,我试过if [ [$Temp > 42000] ]
没有用。