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

Lazytown Constabulary are concerned that young people in the town are unaware of the sorts of crime that they might encounter in their daily lives and are concerned that they may b

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

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

Memory Hierarchy for Linux Systems A cache line has one or more valid bit(s), tag entry and list of bytes in a block in one set of a cache, as shown below: If you were

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

ASP.NET Support for AJAX and JavaScript IntelliSense IntelliSense for Enthusiasm JScript makes it accessible client-script selection components in the value manager in Vision Facil

What will be the output for the following instruction if CX=9087H and AX=9090H? 1) BTR AH,2? 10010000=10010000 2) BTC CX,9?1001000010000111=1001000110000111 3) NEG AX?

Write an interactive C program which prompts the user with the following options on the opening menu: 1) Student information 2) Theory counselling batch-scheduling

What is Data Normalization and Schema Refinement? Define briefly..