Shell script print “gm/afternoon/evening”acc to system time, Programming Languages

 W.A.S.S to print “Good Morning / Afternoon / Evening” according to system time.

 

Program

 

# W.A.S.S to print “Good Morning / Afternoon / Evening” according to system time.

 

str=`date +%k`

if test $str -gt 16

then

   echo "Good Evening!"

else

            if test $str -gt 12

   then

                      echo "Good Afternoon!"

   else

 echo "Good Morning!"

fi

fi

 

 

Output

 

sh good.sh
Good Evening!

Posted Date: 9/26/2012 4:52:39 AM | Location : United States







Related Discussions:- Shell script print “gm/afternoon/evening”acc to system time, Assignment Help, Ask Question on Shell script print “gm/afternoon/evening”acc to system time, Get Answer, Expert's Help, Shell script print “gm/afternoon/evening”acc to system time Discussions

Write discussion on Shell script print “gm/afternoon/evening”acc to system time
Your posts are moderated
Related Questions
Write a program to draw the truck following figure. The program should buttons to provide When the truck runs left wheels must rotate in the correct direction. Rotating whe

Write a function called threshold1 (in a file called 'threshold1.m'. The function takes three arguments. The first two are arbitrarily sized arrays, A and B, and the third is a pos

hi, can you help me with testing java classes I have wrote using java and jsp and servlet in eclipse ? I want to use JUnit for testing

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

can you give me online education system E-R daigram..

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Your task for this project is to develop a system that would provide the following features: 1. Register new student 2. Drop student from university 3. Add a course and gr

How Can I Retrive Unicode CSV File the ADO.net VB.net

Determine the address accessed by each of the following instruction if DS=1100H, BX=0200H, LIST=0250H AND SI=0500H-: 1) MOV LIST[SI],EDX?0250+0500+11000=11750 2