Return to Snippet

Revision: 13057
at April 7, 2009 03:21 by mahome


Initial Code
for year in `seq 2006 2010`
do
	for month in `seq 1 12`
	do
		echo $year $month
	done
done

Initial URL

                                

Initial Description
This script gives a list of year month combinations from 2006 to 2010.
Also have a look at [cal](http://en.wikipedia.org/wiki/Cal_(Unix)), if you are doing something with dates.

Tags: seq, year, month, bash, loop, for

Initial Title
Iterate through years and months

Initial Tags

                                

Initial Language
Bash