in reply to percentage while loop

The nature of while loop makes it quite difficult. For the task at hand (processing a file line by line), I can come up with few solutions, but none that I would recommend. Usually, in a console script, I'd settle for printing a dot every few lines.

UPDATE: As pointed out by GrandFather in a very similar topic today (Estimate line count in text file), you can use tell to detect your position inside the file. That together with detecting the size of the file gives quite a nice solution.