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
#question. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Description: *

**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

1. Introduction The Tube Challenge is a Guinness World Records challenge that tests both the physical and mental abilities of the person trying to break it. The main components

question 1: In the opening lecture I spoke about general changes in business - flatter organizations, process orientation as opposed to functional silos, focus on supply chains, gr

I need a program that writes the first column of the matrix. The numbers in this column follow the pattern below: 1. Numbers start at 1 and count up to ''nels'' in increments of

Exception handling Exception handling is a mechanism that separates code that detects and handles exceptional circumstances from the rest of your program. Note that an exceptional

This section is proposed to be a catch all for several of the fundamental concepts which are used occasionally in working with systems of differential equations. There will not be

1.   You have been asked to write a computer program that will figure out the total of an order when given the amount of the order ($200) and a sales tax rate of five percent.  I w


Flatten the tree Consider the following XML input, which groups people into two categories-salaried and hourly: Warren Rosenbaum 37 5.75