This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
This does what you want. Passing the desired start index as a parameter prevents Groovy from using a default of 1 for the line number.
The eachLine method is defining the second argument to be the line number. It ignores any requests you make of i. For example, if you change i++ to i+=2, you get the same behavior 1-6 as before because eachLine is helpfully setting i to the line number for you.