Monday, March 22, 2010

Welcome the user as they login to the system

tt=`date +"%T" | cut -c1-2`
NAME=`grep "^$LOGNAME" /etc/passwd | awk -F: ' {print $5}'`
echo "\n\n\n"
tput smso
if [ $tt -gt 0 -a $tt -lt 12 ]
then
 echo " $NAME !!!!!!    GOOD MORNING !!!!!!"
elif [ $tt -gt 12 -a $tt -le 16 ]
then
 echo " $NAME !!!!!! GOOD AFTERNOON !!!!!!"
else
 echo " $NAME !!!!!!  GOOD EVENING !!!!!!"
fi
tput rmso

No comments:

Post a Comment