Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Red Hat Linux (http://www.linux-archive.org/red-hat-linux/)
-   -   Obtaining yesterday's date (http://www.linux-archive.org/red-hat-linux/482942-obtaining-yesterdays-date.html)

sunhux G 01-30-2011 03:54 AM

Obtaining yesterday's date
 
I'm trying to get yesterday's date in YYYYMMDD format.

Anyone know if RHES 4.x has GNU date that allows
yesterday=$(date -d "-1 day" '+%Y%m%d')



& if there's no GNU date, how do we go about obtaining it?



Thanks

Sun
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

Cameron Simpson 01-30-2011 09:03 AM

Obtaining yesterday's date
 
On 30Jan2011 12:54, sunhux G <sunhux@gmail.com> wrote:
| I'm trying to get yesterday's date in YYYYMMDD format.
|
| Anyone know if RHES 4.x has GNU date that allows
| yesterday=$(date -d "-1 day" '+%Y%m%d')

Yes, it does.

| & if there's no GNU date, how do we go about obtaining it?

Off the many mirror sites?
--
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

My favorite recently spotted T-shirt: "U.S. Marines: When it absolutely
positively has to be destroyed overnight."
- maxfield@ucssun1.sdsu.edu (Avoid normal situations.)

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


All times are GMT. The time now is 08:32 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.