tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Mark Bowman <mb301 () hotmail ! com>
To: tru64-unix-managers
Subject: SUMMARY: ksh date formats
Date: Tue, 28 Nov 2000 10:49:54 +0000	[thread overview]
Message-ID: <97541177921423.tru64-unix-managers.marc@archive.invalid> (raw)

Many thanks to all that replied to my request for examples of easy ways 
perform date calculations in scripts.

Some of the many examples were one line PERL commands:-

% perl -e 'use POSIX qw(strftime); print strftime("%x\n", localtime(time));'
11/27/00

% perl -e 'use POSIX qw(strftime); print strftime("%x\n", localtime(time -
86400));'
11/26/00

% perl -e 'use POSIX qw(strftime); print strftime("%x\n", localtime(time - 
7*
86400));'
11/20/00

...To moving your timezone back!

# env TZ=MET+24 date +'%m/%d/%y'

To downloading a piece of software which can be found here:- 
ftp://ftp.gnu.org/gnu/sh-utils/sh-utils-2.0.tar.gz
Which I believe will do the trick.

Other links:
http://www.ornl.gov/its/archives/mailing-lists/tru64-unix-managers/2000/08/msg00323.html

http://www.injunea.demon.co.uk/pages/page212.htm

Regards
Mark

_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

                 reply	other threads:[~2000-11-28 10:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox