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

Assignment Help:

 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!


Related Discussions:- Shell script print “gm/afternoon/evening”acc to system time

Algorithm for sorting lists, In this question we will de ne a function for ...

In this question we will de ne a function for sorting lists based upon the algorithm selection sort. First, de ne a function smallest which takes as input a list of integers and r

Language processors, explain steps of program execution in language process...

explain steps of program execution in language processors

Shell script to delete all files from system have size zero, Normal 0 ...

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

Irenecereno, Using the concept of structures, write a program to assign pas...

Using the concept of structures, write a program to assign passenger seats in an airplane. Assume a small airplane with seats numbered as follows: 1 A B C D 2 A B C D 3 A

Create procedures for accessing the root, (a)  Create procedures for access...

(a)  Create procedures for accessing the root, left subtree and right subtree, and also mutators for changing the root, left subtree and right subtree of an avl argument. (b) Wr

Linux/Unix Program 1, **This programming assignment is for use in the LINUX...

**This programming assignment is for use in the LINUX/UNIX environment!! Introduction: System administration often requires custom written programs and tools. One problem a syste

Write a perl script to assign letter grades to the students, Tasks: Writ...

Tasks: Write a Perl script assignGrades.pl to assign letter grades to the students. Please use the classList2.txt file. Upon invoking, the script will access the file classL

Redundant sequence identification, Redundant sequence identification: Given...

Redundant sequence identification: Given a set of k DNA sequences, S = { s 1, s 2, ... ,  s k } give an optimal algorithm to identify all sequences that are completely contained

What is .net?, What is .NET? It is a foundation fairly neutral structure...

What is .NET? It is a foundation fairly neutral structure. Is a coating between the son and the selection language? It can handle many selection dialects, such as VB.NET,

Java Programming, How to i write a car rental program in jgrasp

How to i write a car rental program in jgrasp

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd