Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seconds since the epoch

Status
Not open for further replies.

columb

IS-IT--Management
Feb 5, 2004
1,231
EU
I writing a script which uses dates, and in particular the number of seconds since the epoch. I could use
Code:
$(perl -e 'print time')
but I dont want to invoke perl every time I want the current value. I've looked at date (AIX 5.1 version) and that doesn't have an appropriate flag.

Any suggestions?

Ceci n'est pas une signature
Columb Healy
 
You could write a C program to print epoch time, or you could write the script in perl, thereby reducing the invocations to one.

- Rod


IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

A Simple Code for Posting on the Web
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top