I am trying to write a small script that would
first say hi from 6am to 12 pm and say Good afternood from
1pm to 5pm. I know we use if but it seems I'm doing something wrong.
if $date "+%T" -ge 6 -a le 12
then
echo "Good morning"
fi
if $date "+%T" -ge 1 -a le 5
then
echo "Good afternoon"
fi
Please tell me what's wrong in there, I can't find it.
Thanks