Command to return system time as an integer value

From: Andrew Falanga (falandrew_at_hp.com)
Date: 03/31/04


Date: Tue, 30 Mar 2004 15:02:49 -0700

Hi,

Is there a command that will return the system time as an integral
value? I know that UNIX systems store it as an integer value anyway,
but I'd like to have a command that will return as such, instead of as
formatted date/time stuff.

The reason is, I'd like to be able to perform simple arithmetic to
subtract a day and such. This is for use in a Korn shell script.
Currently, what I'm using is a TCL script I wrote that does this for me,
but I was just wondering if there was a way of doing this without having
to call a sub process.

Just curiosity.

-- 
---------------------------------------------
Andrew R. Falanga (a non-HP employee)
Hewlett-Packard Company
11311 Chinden Blvd.
Boise, Idaho
---------------------------------------------
Please note: The e-mail address is purposely
mangled.  I do not wish my account at HP to
become a spam haven.


Relevant Pages

  • Re: Command to return system time as an integer value
    ... Andrew Falanga wrote: ... > Is there a command that will return the system time as an integral ... I know that UNIX systems store it as an integer value anyway, ... > but I'd like to have a command that will return as such, ...
    (comp.unix.shell)
  • Re: Command to return system time as an integer value
    ... [This followup was posted to comp.unix.shell] ... > Is there a command that will return the system time as an integral ... > but I'd like to have a command that will return as such, ... This is for use in a Korn shell script. ...
    (comp.unix.shell)
  • How to determine in shell if a certain program is running?
    ... determine in a Korn shell script if a certain program is still running? ... I have to execute a command and start monitoring again. ... Henk Borsje ...
    (comp.unix.shell)