Jump to content

I making a max temp notification of an RPI 3 

but it gifts me an error like:

./temp.sh: line 12: 41: command not found

 

the script is:

#!/bin/bash

maxtemp=80;

while :

do

    cpu=$(</sys/class/thermal/thermal_zone0/temp);


    if ("$((cpu/1000))" > $maxtemp)
    then

        ./sendmessage.sh Jens test

    fi
    

    sleep 1
done

 


 

Link to comment
https://linustechtips.com/topic/772182-if-error/
Share on other sites

Link to post
Share on other sites

line 12 being the sleep? Try /bin/sleep 1.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
https://linustechtips.com/topic/772182-if-error/#findComment-9746197
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×