From: Jeff Lightner (jlightner@water.com)
Date: Thu Oct 12 2006 - 10:13:54 EDT
A little script:
#!/usr/bin/perl
print scalar localtime $ARGV[0];
print "\n"
Just give the epoch (seconds) as input.
OR doing single command line:
perl -e 'print scalar localtime $ARGV[0];print "\n"' <epoch>
-----Original Message-----
From: hpux-admin-owner@DutchWorks.nl
[mailto:hpux-admin-owner@DutchWorks.nl] On Behalf Of Schupsky, Mark D
Sent: Thursday, October 12, 2006 10:01 AM
To: hpux-admin@DutchWorks.nl
Subject: [HPADM] Getting the date from the number of seconds since epoch
Anyone know a correlated command to the perl command given below that
would return the date given the number of seconds since epoch?
Mark
-----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) -- ---> 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