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
In this assignment you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application. You

New Features of Visual Studio 2008 1. LINQ Support LINQ primarily is the structure of many conventional question employees that allow you to perform with information in a more user

An apartment complex has several apartments to rent. The apartments are all similar, and all rent for $750 per month. Currently, all units are occupied. The management, being in bu

Write a function drawCA(aname, coords) that uses the plot3 command to draw the C α backbone of the protein. When calling this function, you should pass in the aname and coords var

We need Advancement in Existing PhoneGap Application We need a PhoneGap expert to aid us extend an existing PhoneGap application. The app works pulls data from a new website (de

1) Write a program that takes an input value (for example, a number 5). The output should be sum of all numbers from 1 to the value input by the user (in this example, the output w

Define the Parameter Passing Mechanism - Computer Programming? The Parameters are syntactically identifiers and they are used within the body of the function and sometimes the

Using os.walk, write a script that will print the filenames of zero length files. It should also print the count of zero length files.

Your task will be to code a simulation of image compression based on the approximate low rank structure of the set of image patches. You will write functions .code = my block compr

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