On Tue, 2009-01-20 at 18:55 -0500, Craig Green wrote: > John Horne wrote: > > On Tue, 2009-01-20 at 18:42 -0500, Craig Green wrote: > > > > > >> Only tested on FreeBSD, but I'm pretty certain 'date +%s' is portable. > >> > >> > > Not on Solaris (9 or 10 sparc). > > > > Drat, you're right. Solaris' strftime doesn't include %s, according to > http://docs.sun.com/app/docs/doc/816-0213/6m6ne38ce?a=view. > > Know a quick way of getting Solaris to spit out Unix time? > Not really. If the Solaris companion software has been installed then there *may* be a 'gdate' command (basically the GNU date command), which supports '%s'. But that's only a maybe, no guarantee that it has been installed. So not really portable. An alternative is to use perl to get the time, but a bit of an overkill dragging in perl just for the time :-) John. -- --------------------------------------------------------------- John Horne, University of Plymouth, UK Tel: +44 (0)1752 587287 E-mail: John.Horne@xxxxxxxxxxxxxx Fax: +44 (0)1752 587001