Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get yesterday's date on the terminal, mac os x



On Fri, 2 Sep 2005 16:27:26 +0800
 Louie Miranda <email@hidden> wrote:
> Tried this command to get the yeterday's date.
> 
> date -v -1d +"%Y%m%d"
> 

This script works  in tcsh

[TME-Laptop:~] tme% more yesterday 
#  Find the date yesterday
set sec=`date +%s`
set sec=`expr $sec - 86400`
date -r $sec
#

Regards
Marshall


> But did not work..
> 
> date: illegal option -- v
> > usage: date [-nu] [-r seconds] [+format]
> > date [[[[[cc]yy]mm]dd]hh]mm[.ss]
> > 
> 
> How can i get yesterday's date?
> 
> -- 
> Louie Miranda
> http://www.axishift.com -- under development

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden

This email sent to email@hidden

References: 
 >Get yesterday's date on the terminal, mac os x (From: Louie Miranda <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.