[HPADM] RE: SUMMARY: Getting the data in seconds since epoch

From: Jeff Lightner (jlightner@water.com)
Date: Thu Oct 12 2006 - 09:58:04 EDT


That didn't quite seem to work. Also leaves it inline with prompt.

Doing:

perl -e 'printf "\n", printf %d, time();'

made it work on both Linux and HP-UX 11.11 and put the newline in to
separate it from the prompt.

-----Original Message-----
From: hpux-admin-owner@DutchWorks.nl
[mailto:hpux-admin-owner@DutchWorks.nl] On Behalf Of Shaw, Marco
Sent: Thursday, October 12, 2006 8:25 AM
To: hpux-admin@DutchWorks.nl
Subject: [HPADM] SUMMARY: Getting the data in seconds since epoch

Answer from: Bill Thompson

"Here's one way: perl -e 'printf "%d", time();'"
 

Original query:
---------------
I want a simple command like 'date' to get the seconds since epoch on a
HP-UX (11.23/PA-RISC) server.

Anything exists?

Marco
---------------

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact
majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner:
owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse
only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse &
search)
--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:54 EDT