On Tue, Jan 09, 2007 at 08:33:37AM -0500, Michael Nemeth wrote:
True but I believe that solaris comes with perl and old one but one should handle the date stuff. Atlest the one system I found here that does have an update perl reports sun pkg SUNWpl5u, Can any one confirm this? And can anyone supply the code to do a timestamp like the GNU date +%s ?
If there is no other way, this program (compiled on Solaris 8) will do it. Save the attachment, then:
$ uudecode tstamp.uue $ gunzip tstamp.gz $ ls -l tstamp -rwxr-xr-x 1 hstoerne other 3772 Jan 9 15:17 tstamp $ ./tstamp 1168352286
Source code for this utility is a whopping 7 lines:
#include <time.h> #include <stdio.h> int main(int argc, char **argv) { printf("%d\n", (int) time(NULL)); return 0; }
Henrik