terminal - Shell line 7: [14: command not found -


this question has answer here:

i don't know problem fix here code:

#!/bin/sh while true hour=$(date '+%h') target=16 echo $hour if [$hour -gt $target]; mail -s "ip" "example@hotmail.com" <<eof global_ip=$(curl -s checkip.dyndns.org | sed -e 's/.*current ip address: //' -e 's/<.*$//') eof echo "sent" fi echo "waiting..." sleep 3600 echo "done waiting" done 

please help!

you have add blanks after [ , before ]:

if [ $hour -gt $target ]; 

Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -