I use php4-cgi to write scripts on my linux box. The scripts are going through lots of data and I want to print output to the screen as it runs.
Printing output to the screen is no problem, but it prints out line for line, and soon enough your screen is full of lines.
I've seen a perl program that keeps all the output on 1 line. it updates the same line till it is complete.
so, even though it prints a new value for each % it is complete, here is how a program calld "someprogram.pl" would look after running it:
Code:
$ ./someprogram.pl
[ 50%] Complete
does that make sense? normally it would read
Code:
$ ./someprogram.pl
[ 1%] Complete
[ 2%] Complete
[ 3%] Complete
.. and so on
Any ideas how to keep output to 1 line?