Shell script to display system time in words, Programming Languages

 W.A.S.S to display system time in words.

 

Program

 

# W.A.S.S to display system time in words.

 

hrs=`date +%H`

mnts=`date +%M`

sec=`date +%S`

echo -e "`grep "$hrs" hour.txt|cut -d" " -f2` hours - \c"

 

#grep is used for searching records from file

 

echo -e "`grep "$mnts" minutes.txt|cut -d" " -f2` minutes - \c"

echo "`grep "$sec" minutes.txt|cut -d" " -f2` seconds"

 

Output

 

sh wtime.sh

Nine hours - ThirtyTwo minutes - Twenty seconds

Posted Date: 9/26/2012 4:50:18 AM | Location : United States







Related Discussions:- Shell script to display system time in words, Assignment Help, Ask Question on Shell script to display system time in words, Get Answer, Expert's Help, Shell script to display system time in words Discussions

Write discussion on Shell script to display system time in words
Your posts are moderated
Related Questions
Class a Abstract Data Type: is a template for creating objects. A class describes a collection of related objects i.e. instances of the classes. Basically classes are user-defined

Define an Example of Switch Statement? estimate(number) int number; /* Estimate a number as none, one, two, several, many */ {       switch(number) { case 0 :

Write a program to mask bits D3D2D1D0 and to set bits D5D4 and to invert bits D7D6 of the AX register.


Let us say we have a list of 10 animal objects called "animals" in Alice. Write the code to move them forward synchronously by 1 meter.

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

Villa La Fourche Ltd is a small family business situated in the East Coast of Mauritius, more precisely Trou d'eau Douce.   The compound comprises of 6 independent villas, each of

In this Project your task is to create a program that displays various levels of the fractal structure of the so called square shaped Sierpinski-carpet. The display of level 4 is s

n2=2:100; t=3; while t { g3(t)=(1/2)*(0.63)*(0.8.^(n2)); t=t+1; } g3(1)=0; g3(2)=0; what is wrong with the code above? it tells me that line: g3(t)=(1/2)

Return a new picture with each pixel''s color values made up of 80% of the color values of the corresponding pixel in the first picture and 20% of the color values of the