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
Assume that you are a college professor needing to average grades for 10 students. Write a program that asks for each student's name and grade. Print the list on-screen with each s

Provide Example of Function? An illustration of a function definition main() { message(); } /* header */ message() { /*bodystarts here*/ printf ("Example for function

THERE IS ANY1 COULD HELP ME WITH NETLOGO WORK

Introduction Each module of the course includes a programming project. However, for Modules 5 and 6 we will do a single project to cover both. The purpose of the programming p

1 Problem Description The task of the assignment is to build a book recommendation system for Auer Libraries. The system is to be implemented in Prolog and as the owners of t

how do I change a existing formula with a new formula and it show the result

Procedure-oriented programming (POP):- This is a top-down programming approach, where the problem is viewed as a sequence of tasks to be done such as calculating, printing etc. A n


JavaScript is "Object Oriented" like C++ or Java. (Note that Java and JavaScript are not the same language, which is a common misconception) It also has variables, which makes Java

* Comments in your code are required * Main Program Operation:  # Your program should first prompt the user for an integer to seed the random number Generator. "Enter an seed