SUMMARY: ksh date formats

From: Mark Bowman <mb301_at_hotmail.com>
Date: Tue, 28 Nov 2000 10:49:54 +0000

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
Received on Tue Nov 28 2000 - 10:51:24 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT