Re: date -1 question



You can do this using the TZ environment variable.

e.g.
date
Thu 27 Jul 17:37:02 2006
echo $TZ
GMT0BST,M3.5.0/01,M10.5.0/02
ksh TZ=GMT24BST,M3.5.0/01,M10.5.0/02 date
Wed 26 Jul 17:38:00 2006

Check the archives if you need more suggestions: it's been discussed before.

--
Simon Green
Altria ITSC Europe s.a.r.l.

AIX-L Archive at https://lists.princeton.edu/listserv/aix-l.html

New to AIX? http://publib-b.boulder.ibm.com/redbooks.nsf/portals/UNIX

N.B. Unsolicited email from vendors will not be appreciated.
Please post all follow-ups to the list.


-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of Mark
Schlechte
Sent: 27 July 2006 17:16
To: aix-l@xxxxxxxxxxxxx
Subject: date -1 question


I'm using smbclient in a script to get a file from a windows server share.
The format of the file is filenamemmddyy.txt so I'm using get filename`date
'+%m%d%y'`.txt but my problem is the file I want to get was created
yesterday.

So I'm wondering how get yesterdays file based on ctime or somehow 'date -1'
etc.?