|
Posted by Jason Wong on 01/08/05 20:44
On Sunday 09 January 2005 01:01, Robert M. Pufky wrote:
> 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.
rewind()
> 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)
Note that you'll have to keep track of line lengths so remnants from a
previous iteration are properly overwritten.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
New Year Resolution: Ignore top posted posts
Navigation:
[Reply to this message]
|