The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > AIX
Google UNIX.COM


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Date Question DKNUCKLES Shell Programming and Scripting 2 10-21-2007 04:44 PM
Date Scripting Question BigDawg32 Shell Programming and Scripting 6 10-19-2006 09:40 AM
Date question 12yearold Shell Programming and Scripting 1 07-25-2006 10:46 PM
date question rdeschene3 Shell Programming and Scripting 3 06-01-2005 04:46 PM
date question ankurgupta UNIX for Advanced & Expert Users 3 03-13-2002 10:11 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-02-2005
Registered User
 

Join Date: Sep 2001
Posts: 20
Date question

I am creating a shell script and have a question about how to determine yesterdays date. In my script, I can determine today by:

today=`date '+%Y%m%d'`

but I am not sure how to determine yesterday. In other languages, I would just subtract one from today, but I don't know how to do that here. Please understand that I do NOT want to change the system date, I just want to determine the date for yesterday in a YYYYMMDD format. Any help would be greatly appreciated.
Reply With Quote
Forum Sponsor
  #2  
Old 12-02-2005
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,262
Please refer to the scripts section of the board. Perderabo (IIRC) has done all the work with calulating dates and put it there.

bakunin
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 05:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0