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
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Example problem Imagine that  you  require  to create  a robot  that  will  roll up  close to a light  lamp  and  stop  a fixed distance from it.  The first question is, how w

Question: (i) What is multithreaded programming? Lists the benefits achieved by multithreading your code in a program. (ii) What type of coding should be eliminated when d

Explain the Comma Operator- Computer Programming? The comma has two utilization and the most common use is as a parameter separator for data types and function parameter lists. H

Your task is to write an application to analyse texts in a file.  Your application will employ  several kinds of text-analyser objects (which you also have to implement)  as descri

Write a detailed description on how you would go about planning information system for an organisation


How do i get back data from a FOR loop in order to print them on screen?

Example- Arithmetic :  Given the subsequent two matrices, So calculate A-5B. Solution There isn't much to do now other than the work. We first multiplied

basic steps involved in spreadsheet developement