Writing mulitple output lines to single line
| From: | Robert M. Pufky | Date: | Sat, 08 Jan 2005 17:01:09 +0000 |
| Subject: | Writing mulitple output lines to single line | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-205875@lists.php.net to get a copy of this message | ||
Hello all,
I have tried looking through the previous messages, but I have yet to find anything that involves my specific problem. Maybe I am not searching for the correct terminology.
I current have a php script that processes many files (6000+). When it is processing a file, it prints out what is going on with each file to a seperate line. What I want to do is OVERWRITE the output line for each file, and keep output to a single line. (Please see below for example) - I know it is possible to do this in bash, pearl and other scripting languages, but I have yet to figure out if it is possible in php. I have tried printing backspace characters (\b), the ascii equivalent, etc, but nothing seems to be working. If anyone has any solutions / suggestions, it would be most welcome.
Example:
Current screen (after 3 iterations):
running cleanup...
processing 1 of 6453: adding extensions / removing case.
processing 2 of 6453: adding extensions / removing case.
processing 3 of 6453: invalid extension - deleteing.
Wanted screen (after 3 iterations):
running cleanup...
processing 3 of 6453: invalid extension - deleteing.
(The content of the lines is unimportant, its the number of lines showing that is)
Thanks in advance!
- bob.