Sunday, October 26, 2008

Printing next day's date..

hi,

i need help on getting next day's date in aix.. I want to assign it to a variable in shell script. Can anybody help on this???

Girs

1 comment:

Diju Pavithran said...

In linux it is easier, the common date command has '--date=STRING' switch,eg:- --date=tomorrow, which will give the desired output. But dont know why it dont work with AIX.

But there is an easy work around with perl, try this out, it should work with AIX.

perl -MPOSIX -le 'print strftime "%m/%d/%Y",localtime(time+86400)'


DIJU