Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.unix.questions Subject: Re: How to get seconds-since-epoch in shell script Message-ID: <1990Sep27.172541.1106@iwarp.intel.com> Date: 27 Sep 90 17:25:41 GMT References: Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Distribution: comp Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 23 In-Reply-To: mjd@central.cis.upenn.edu (Mark-Jason Dominus) In article , mjd@central (Mark-Jason Dominus) writes: | I want to be able to get the the time in seconds-since-epoch | form, and I was surprised to learn that none of the `date' | commands we have near here had a seconds-since-epoch format, | since it would have been so easy to include. | | Is there a way to get that time that is easier than | computing it from the second, minute, hour, julian-date, and | year? perl -e 'print time;' Looks pretty easy to me. If you were willing to fork a 'date', forking a 'perl' is about as tough. [What, you're not running Perl yet? Complain to your sysadm...] print "Just another Perl hacker," -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/