I\'ve got a shell script which does the following to store the current day\'s date in a variable \'dt\':
date \"+%a %d/%m/%Y\" | read dt echo ${dt} >
date \"+%a %d/%m/%Y\" | read dt echo ${dt}
If you have Perl available (and your date doesn't have nice features like yesterday), you can use:
date
yesterday
pax> date Thu Aug 18 19:29:49 XYZ 2010 pax> dt=$(perl -e 'use POSIX;print strftime "%d/%m/%Y%",localtime time-86400;') pax> echo $dt 17/08/2010