I have to find 13 periods for forecast, so that I can find 13 forecast days.
For this I need a shell script which do the following.
Take the system date and find next monday and then next consecutive monday and then next consecutive monday. These mondays are my forecast days, but if next month comes it must take the 1st day i.e. (2008-09-01) as another period and again repeat the previous process i.e again find next monday and then next consecutive monday and then next consecutive next monday.
So if you run the script on 2008-08-24 (sunday) the output must be as follows
2008-08-25 (monday)(1st period)
2008-09-01(1st day of the month and monday)(so no problem over here)(2nd period)
2008-09-08(monday)(3rd period)
.
.
.
2008-10-01(1st day of the october)(7th period)
2008-10-06(1st monday of that month)(8th period)
..
..
..
and so on upto 13 periods...
Pls help me with this shell script...
thanks