mhorrocks
asked on
setting date variable to be yesterday's date in Perl AIX
Actually I have sh script which sets the following variable:
TDATE=`date +%Y%m%d`
We then use this variable to set another variable:
CSFILE="test$TDATE"
I need help setting the TDATE variable to be yesterday's date.
This is very important, vendor switched when they send their file and it is always a day behind, example of a file they send would be: test20060706.txt
I am giving 500 points for this answer.
TDATE=`date +%Y%m%d`
We then use this variable to set another variable:
CSFILE="test$TDATE"
I need help setting the TDATE variable to be yesterday's date.
This is very important, vendor switched when they send their file and it is always a day behind, example of a file they send would be: test20060706.txt
I am giving 500 points for this answer.
ASKER
Ok. I need to delete this question and I will submit it under Unix SH scripting.
please delete this question and return the points.
please delete this question and return the points.
To delete the question you need to post a question in community support ("Help" link at top-right of page)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If it's an sh script: You might be more answers in the OS->Unix topic area, or maybe OS->Linux.
If it's a perl script, you could use the strftime to format the time
See here for more info:
http://perldoc.perl.org/POSIX.html