How can I get the date of yesterday and return in format
"ddmmyy"? It is easy to get the date of today(`date`), but how about
$ (export TZ="JST+29"; date +%d%m%y)Quote:>Hi, Everybody,
> How can I get the date of yesterday and return in format
>"ddmmyy"? It is easy to get the date of today(`date`), but how about
29=24 + hours behind GMT (5 in my case)
varies for cst/cdt
this purportedly works on IRIX, OSF, Solaris, but not HP.
Biophysics & Biochemistry, Box 8231 | WWW: http://dasher.wustl.edu/~reece/
Washington Univ. School of Medicine | Phone: (314) 362-4198 (lab) -7183 (fax)
660 South Euclid | PGP public key available by finger & WWW
St. Louis, Missouri 63110 (USA) |
Jeff> You should practice what you preach. The 'date' command doesn't have thatQuote:>> man date
>> (GNU date, preferably.)
>> -- Vincent
Quoted from the GNU date manpage:
To print the date of the day before yesterday
date --date 2 days ago
To print the date of the day three months and one day
date --date 3 months 1 day
I need to store the date from yesterday in a unix shell variable.
In other systems (programming languages etc.) this can be done with a
function similar to SYSDATE()-1
How can this be realized in a UNIX shell script ????
2. XGA support?