Developing simple exercises in Unix Graphics.

Developing simple exercises in Unix Graphics.

Code:

clear
name=$(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

Output:













No comments

Powered by Blogger.