Link to home
Start Free TrialLog in
Avatar of mhorrocks
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.
Avatar of Adam314
Adam314

Is this perl, or an sh script?

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
Avatar of mhorrocks

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.
To delete the question you need to post a question in community support ("Help" link at top-right of page)
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial