Obtaining yesterday's date

Cameron Simpson cs at zip.com.au
Sun Jan 30 10:03:30 UTC 2011


On 30Jan2011 12:54, sunhux G <sunhux at 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 at 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 at ucssun1.sdsu.edu (Avoid normal situations.)




More information about the redhat-list mailing list