Note: You are using RedHat Linux w/ Bash installed
time=`/sbin/hwclock | cut -d: -f1 | cut -d' ' -f4`
if [ $time \> 8 ]; then
if [ $time \< 5 ]; then
echo "Hello, $USER"
echo "Good Bye, $USER"
If it is meant to be put in the login file then out in the apporpriate one.