This is almost a FAQ.
Using a Super Search will give you plenty of ideas.
Here a just a few:
I'm sure that you can find plenty more.
Cheers,
Darren | [reply] |
| [reply] |
if you know in advance how many lines/files you're processing you can do this, otherwise you can only display a bar that lenghtens by a unit each time you start processing another file.
you basically have to insert a printing statement without a \n in the loop of the file/line processing statements.
i've done this a few times, let me know if that didnt help :) | [reply] |
if you know in advance how many lines/files you're processing you can do this, otherwise you can only display a bar that lenghtens by a unit each time you start processing another file.
Not (completely) true. You will always know the size of the file you are processing, well at least if it is a regular file, not a socket or something similar. If you know the size, count the bytes you have already processed and your progress bar will always be accurate.
| [reply] |
An almost identical question was asked here, and I suggested this code, as an example of a subroutine which creates a "closure" to manage the desired progress meter.
Please try it out; I think it will do what you need.
s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
| [reply] |