Developing simple exercises in Unix Graphics.
Developing simple exercises in Unix Graphics.
Code:
clearname=$(zenity --entry --title="Greeting user" --text="Enter your Name ")
d=$(date '+%H')
if [ $d -ge 0 ] && [ $d -lt 12 ]
then
zenity --info --title="Greeting user" --text="Good Morning $name"
elif [ $d -ge 12 ] && [ $d -lt 15 ]
then
zenity --info --title="Greeting user" --text="Good Afternoon $name"
else
zenity --info --title="Greeting user" --text="Good Evening $name"
fi
Leave a Comment