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
do you solve questions of assigments?

asample database report

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

Simple Shell In this LAB, you will explore and extend a simple Unix shell interpreter. In doing so, you will learn the basics of system calls for creating and managing process

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

Special Matrices There are some "special" matrices out there which we may use on occasion. The square matrix is the first special matrix.  A square matrix is any matrix that s

Can you provide help in solving error problems, with my matlab project?

This assignment is divided into two parts. The goal is to write a Java program that calculates capital gain on a stock market, see Lab 7. When a share of common stock of some co

Question : (a) Many systems provide support for both user threads and kernel threads, resulting in different multithreading models. What are the two differences between user

Lexical Analyzer: Symbol Table - Holds the symbols accepted by the lexical analyzer or parser.  Each symbol may be a terminal or a non-terminal.  Terminal symbols are listed