This question already has an answer here:
I don't know what is the problem to fix Here is the code:
#!/bin/sh
while true
do
HOUR=$(date '+%H')
TARGET=16
echo $HOUR
if [$HOUR -gt $TARGET];
then
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 to add blanks after
[
and before]
: