As we said in the comments, this solved the issue:
Temp=$(adb shell cat /sys/devices/platform/omap/omap_temp_sensor.0/temperature) | grep -o "[0-9]*")
First of all, you were not fetching the number properly. Note that you need to use
Temp=$(command)
While you were using
Temp=command
Then we saw that your input was not integer. I guess there must be some trailing characters. To delete them, I suggest to use grep -o "[0-9]*"
, which just matches the numbers in the string given. EXamples:
$ echo "23 " | grep -o "[0-9]*"
23
$ echo "as23.22" | grep -o "[0-9]*"
23
22
$ echo "23" | grep -o "[0-9]*"
23