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:
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
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
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
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
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
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
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)
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
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
10 matches
Mail list logo