RE: [SLUG] need shell script routine

From: Rock (mrock@stewartsigns.com)
Date: Fri Feb 06 2004 - 13:38:15 EST


I pick a field out of a read record, say time field and it look like
this:

00:01:15
00:02:35
01:06:12
00:56:50

you can make up as much sample data as you feel Is necessary. My issue
is the rolling from seconds in excess of 59 and minutes in excess of 59
into the next category ( ie: each 60 seconds add 1 minute to the minutes
field total and 60 minutes adds 1 hour to the hour field total.

I can write this. I was just wonder if any one had a routine already
that I could use.

Michael C. Rock
Systems,

-----Original Message-----
From: slug@nks.net [mailto:slug@nks.net] On Behalf Of Jim Wildman
Sent: Friday, February 06, 2004 1:12 PM
To: slug@nks.net
Subject: Re: [SLUG] need shell script routine

On Fri, 6 Feb 2004, Rock wrote:

> I need a shell script routine that I can include in my program that
adds
> time in the format 00:00:00 hours:minutes:seconds for as many as 4
> consecutive records on many different occasions in a very large text
> file.
> I read in records one at a time and test to see if this is a time
> record. If it is the first record in a new series than I start my
> counter all over again.
> I just don't want to reinvent the wheel at this moment!
>

How about some sample input and output? Hard to do much without that.

------------------------------------------------------------------------
Jim Wildman, CISSP, RHCE
jim@rossberry.com
http://www.rossberry.com
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:31:29 EDT