loop number of records.

Initially i store some files into anothe file Y. Now i want read the contents of file Y one by one do some check on each file.
i,e
Open file Y (contains multiple files)
First read a file , do some check on that individual file.If that file satisfies teh condition put it in another file.
Now read the second file, check, if satisfies put it in another file.
NOw read the third file....
This process continues till all the files in File Y are finished.
How can i solve this.
how can i read one file, do check, then second file, do check...

Please do read the rules of the forum ! :slight_smile:

No duplicate posting

http://www.unix.com/aix/53676-loop-records.html\#post302168053