RE: output to one changing line

2004-09-15 Thread Bob Showalter
JupiterHost.Net wrote: Hello list, I've seen this done, but am not sure what its called or where to start looking... Instead of the output of a script via CLI being: # perl script.pl line1 line2 line3 etc # I'd like the line to change as it runs, sort of an animated delivery:

Re: output to one changing line

2004-09-15 Thread JupiterHost.Net
Does that make sense :) ?? Yes. Just print a \r to move the cursor back to the beginning of the line. perl -e '$|=1; print \rLine $_ and sleep 1 for 1..3; print \n' Nice, that does it perfectly, thanks Bob for the \r Thanks also to Chris for the same idea but different character :) Have a gdood

Re: output to one changing line

2004-09-15 Thread Jenda Krynicky
From: Chris Devers [EMAIL PROTECTED] On Tue, 14 Sep 2004, JupiterHost.Net wrote: I'd like the line to change as it runs, sort of an animated delivery: I've seen a Damian Conway presentation where he faked out this behavior by prefixing all output with enough backspace (\h) characters

Re: output to one changing line

2004-09-15 Thread JupiterHost.Net
I've seen a Damian Conway presentation where he faked out this behavior by prefixing all output with enough backspace (\h) characters to wipe out the previous output and display a new line. I guess you mean \b, not \h :-) That must've been it then :) That does work for me under Win2k. Does the

Re: output to one changing line

2004-09-15 Thread Chris Devers
On Wed, 15 Sep 2004, JupiterHost.Net wrote: Does the \r solution work on winders (I don't have any Winders computers) also? perl -e '$|=1; print \rLine $_ and sleep 1 for 1..3; print \n' I've just successfully tested it on the Cygwin version of Perl, both from a local DOS window and from a

RE: output to one changing line

2004-09-15 Thread Tim Johnson
That doesn't work on my WinXP, but this does... perl -e $|=1; print \\rLine $_\ and sleep 1 for 1..3; print \\n\ -Original Message- From: JupiterHost.Net [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 2:03 PM To: [EMAIL PROTECTED] Subject: Re: output to one changing line

Re: output to one changing line

2004-09-15 Thread JupiterHost.Net
Chris Devers wrote: On Wed, 15 Sep 2004, JupiterHost.Net wrote: Does the \r solution work on winders (I don't have any Winders computers) also? perl -e '$|=1; print \rLine $_ and sleep 1 for 1..3; print \n' I've just successfully tested it on the Cygwin version of Perl, both cool, thanks! from

Re: output to one changing line

2004-09-15 Thread JupiterHost.Net
Tim Johnson wrote: That doesn't work on my WinXP, but this does... perl -e $|=1; print \\rLine $_\ and sleep 1 for 1..3; print \\n\ Its because you used double quotes instead of single quotes to surround the expression and need to escape the internal ones :) Try this (paste it exactly as is ;p)

Re: output to one changing line

2004-09-14 Thread Chris Devers
On Tue, 14 Sep 2004, JupiterHost.Net wrote: I'd like the line to change as it runs, sort of an animated delivery: I've seen a Damian Conway presentation where he faked out this behavior by prefixing all output with enough backspace (\h) characters to wipe out the previous output and display a

Re: output to one changing line

2004-09-14 Thread JupiterHost.Net
Chris Devers wrote: On Tue, 14 Sep 2004, JupiterHost.Net wrote: I'd like the line to change as it runs, sort of an animated delivery: I've seen a Damian Conway presentation where he faked out this behavior by prefixing all output with enough backspace (\h) characters to wipe out the previous