Shell script to display system time in words, Programming Languages

Assignment Help:

 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


Related Discussions:- Shell script to display system time in words

Capstone project, I need help programming an arduino uno to scan an ean-8 s...

I need help programming an arduino uno to scan an ean-8 student barcode and display their name and id on computer. This is a capstone project.

Simulation algorithm, Please remember to read and follow all of the assignm...

Please remember to read and follow all of the assignment guidelines. This assignment will expand upon the simulation algorithm given in class to produce a program which may be u

Explain the break statement - computer programming, Explain the Break State...

Explain the Break Statement - Computer Programming? The break statement is used as an interrupt to the normal flow of control this statement causes as exit from the switch stat

Sizes of the clusters influence-k-means program, Objective: to show if th...

Objective: to show if the sizes of the clusters influence the communication cost among a set on nodes Write a K-Means  program  for a set of M points randomly distributed on an

Retrive unicode text using vb.net ado.net, How Can I Retrive Unicode CSV Fi...

How Can I Retrive Unicode CSV File the ADO.net VB.net

Assembly TASM or MASM, I need help with making a assembly program that uses...

I need help with making a assembly program that uses Hoffman''s coding scheme to compress a text file.

Object-oriented programming paradigm, Object-oriented programming paradigm ...

Object-oriented programming paradigm Object  Oriented  Programming  is  an  aproach  in  which  a  program  is  viewed  as  a  dynamic  network  of collaborating objects, where

Pattern matching program in xhtml, Part 1 Given the following Regular Exp...

Part 1 Given the following Regular Expressions, explain in detail the pattern accepted by each. Pay attention to all the characters being used. Your answers need not appear with

Write a program that prints gross and net pay and taxes , Assume that a vid...

Assume that a video store employee works 50 hours. She gets paid $4.50 for the first 40 hours; she gets time-and-a half pay (1.5 times the regular pay rate) for the first five hour

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd