It is often necessary to work out yesterdays or tommorrows dates in scripts. Here's an easy way to do it.

Yesterday=`TZ=PST+24 date +%D` 
echo "Yesterday is:" $Yesterday 

Tomorrow=`TZ=PST-24 date +%D` 
echo "Tomorrow is: " $Tomorrow 

Today=`date +%D` 
echo "Today is:" $Today

Recent Changes

Contribute to this wiki

Why not help others by sharing your knowledge? Contribute something to this wiki and join out hall of fame!
Contact us for a user name and password