UNIX date command

Hello...I have have the value of date command stored in a particular format in a variable...Is there any way by which I can increment the value of the date using unix only?Until now i was calling an sql query to increment the date..

Thanks

What is the format ?

In general it is possible to increment the date.

hi the format is YYYYMMDD.......

eg : today is
20060214

well let me refine my query...

I have a set of dates in the format:
YYYYMMDD stored in a file...
what i do is read each value and increment the date in each..

till now i was calling an sql query to perform this task...

i searched the man pages and got the command
date --date="+1 day"
but the above command increments the date wrt to today's date..

my date may have any value...
so is there any command that can perform this operation..?
i dont want to invoke a shell script and would rather prefer a command ( if it exists)...........

thanks in advance......

no easy way.

i'd use perl.

try the perl cookbook

perl CD

See the Date Arithmetic article in our FAQ section especially datecalc...

$ datecalc -a 2006 02 14 + 1
2006 2 15
$

Yes..I had in fact lokked into the date calc script which is immensely useful for such calculations...but the problem is that that would entail an extra shell script in the package that is to be handed over to our clients and that i have been told to avoid ...If anyone comes across any single line command that would do the trick, kindly let me know............