in reply to progress bar

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 :)

Replies are listed 'Best First'.
Re^2: progress bar
by holli (Abbot) on Aug 15, 2006 at 10:57 UTC
    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.


    holli, /regexed monk/