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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -