#
#Write a script to display the date, time and a welcome message (like Good Morning etc.). The time
#should be displayed with “a.m.” or “p.m.” and not in 24 hours notation.
#
clear
echo "Welcome , "$(who m i | tr -s " " |cut -d " " -f1)
hour=$(date +"%H")
if [ $hour -gt 0 -a $hour -le 12 ]
then
echo "Good Morning"
elif [ $hour -gt 12 -a $hour -le 17 ]
then
echo "Good afternoon"
elif [ $hour -gt 17 -a $hour -le 19 ]
then
echo "Good evening"
elif [ $hour -gt 19 -a $hour -le 24 ]
then
echo "Good night"
fi
echo "Date :"$(date +"%d/%m/%Y")
echo "Time :"$(date +"%r")