Repeating loop between dates

Hi ,

I need to execute set of commands between two parameterized dates.

Suppose, If parameter1 is Feb1st-2010 and parameter2 is November15th-2010. I need to execute a set of commands within these dates .
can any one help me to build a loop so that it should execute for 28days in February and 31 days in march likewise..

If you have GNU date (ie date supports -d) using bash (note 86400 is number of seconds in a day 24*60*60):

#!/bin/bash
START=$(date -d 1-Feb-2010 +%s )
END=$(date -d 15-Nov-2010 +%s )
for((i=START; i<=END; i+=86400))
do
    date -d @$i
done

Chubler thanks for Quick reply.
I have one more query ,I need to print the date for each iteration in the for loop.
i.e. for the 1st iteration the date should be returned as 01/02/2010 and for the 2nd iteration it is returned as 01/02/2010 likewise ..

Thanks,

My original code prints the date for each iteration:

Mon Feb  1 00:00:00 EAST 2010
Tue Feb  2 00:00:00 EAST 2010
...

If you want dd/mm/yyyy format, use +%d/%m/%Y in the loop:

#!/bin/bash
START=$(date -d 1-Feb-2010 +%s )
END=$(date -d 15-Nov-2010 +%s )
for((i=START; i<=END; i+=86400))
do
    date -d @$i +%d/%m/%Y
done

thank you very much