[Tutor] Reading every 5th line

nitin chandra nitinchandra1 at gmail.com
Sun Aug 8 14:04:21 CEST 2010


Hello Everyone,

I am to make a small programme for a friend of mine
where i am to start reading from 14th (string) from a file and then
read every 5th row.

ie.

in 1st read it reads the 14 row in a File, write to an OUTPUT-1 file
Next reads 19th row, write to the OUTPUT-1 file
then 24th row,... so on.

and the second loop does is

reads the 15th line as the first line from same input file and write
to OUTPUT-2 file
next reads 20th line / row, write to the OUTPUT-2 file


I have tried various ways but some how i am ONLY able to do i simple
read from one file and write to another.

There are 3024 rows / lines PER file and there are 24 such file I need
to run the programme on.

I really need this on an urgent basis. can some one please help me in this.

Thanks in Advance

Nitin


More information about the Tutor mailing list