Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get tomorrow's date? 1

Status
Not open for further replies.

lutech

Programmer
Jan 25, 2002
16
CA
How can I get tomorrow's date?I have to use tomorrow's date in my file name, How to get it?
 
There's a FAQ entry on this in the general unix forum Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Hello

Assign value of tommorows date to a variable and make that
variable as part of your file name

eg.
tommorow=`TZ=PST-24 date +%d%m%Y`
echo $tommorow

Hope it helps

Sharad
 
#!/bin/sh
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

paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top