[HPADM] RE: Getting the date from the number of seconds since epoch
- From: "Jeff Lightner" <jlightner@xxxxxxxxx>
- Date: Thu, 12 Oct 2006 10:13:54 -0400
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@xxxxxxxxxxxxx
[mailto:hpux-admin-owner@xxxxxxxxxxxxx] On Behalf Of Schupsky, Mark D
Sent: Thursday, October 12, 2006 10:01 AM
To: hpux-admin@xxxxxxxxxxxxx
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@xxxxxxxxxxxxx
[mailto:hpux-admin-owner@xxxxxxxxxxxxx] On Behalf Of Shaw, Marco
Sent: Thursday, October 12, 2006 8:25 AM
To: hpux-admin@xxxxxxxxxxxxx
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@xxxxxxxxxxxxx
Name: hpux-admin@xxxxxxxxxxxxx Owner:
owner-hpux-admin@xxxxxxxxxxxxx
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@xxxxxxxxxxxxx
Name: hpux-admin@xxxxxxxxxxxxx Owner:
owner-hpux-admin@xxxxxxxxxxxxx
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@xxxxxxxxxxxxx
Name: hpux-admin@xxxxxxxxxxxxx Owner: owner-hpux-admin@xxxxxxxxxxxxx
Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only)
http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)
- Prev by Date: [HPADM] Getting the date from the number of seconds since epoch
- Next by Date: [HPADM] unsubscribe
- Previous by thread: [HPADM] Getting the date from the number of seconds since epoch
- Next by thread: [HPADM] unsubscribe
- Index(es):
Relevant Pages
|
|