V0.2.0 of adminscripts
Henrik Stoerner
henrik at hswn.dk
Tue Jan 9 15:19:31 CET 2007
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
-------------- next part --------------
begin 755 tstamp.gz
M'XL("(.CHT4 W1S=&%M< "55V]L%%40G[T_]"@M7J^%@A!9*29%8?L/A2*)
MUY:V(+4%2JUHS-ZVMZ4+U[MF=_D737HTQ/C!#Y6 at 48+A%&.,,8U!/D!"0E-,
M] ,Q:/C0-(84(8$829KX14+UG'GO[?7E/&MXS>R;>?.[>?/^S,SK2&M'F^)3
M(-=\^ >@@!+X#OM- ,4WV?@F4"$(U; 25J"TB(THI&<M(R at H9#_2S7FC4";Z
M at .@5Z8NM:#<G_'U.@[*/C9%X%ND* 84>?0R5@ ^)MTN>(?K4'';LFH355Y.(
M:TY*JQ.Z2D&*\,_S99'X70AI,=(2,>[97HKTA+26L+2>"%(Y4 at 72\MP.SK<@
M_+L52WQI ;W<EBV at 4W!_9CTG@*^#-95W3X)O,:TI4,9]JP*%[V<97]NSN'\_
M")G6M!GM'1,RK7D/RE]*]E_+LY_T]K^,[\]1G,^3:;Y5WOQ/<_EM[SS+^+I/
MH3PGV3^#\D5)/H?V?Q=XVH>/43\AZ;_ ]9#?JR-\3[]&>0/V%1%^AA?$'78C
M_%POY_G_$^*C8G_([UN at +'H7^VJ&=ZTA$_27C^A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