help with printing to stdout...

D

Daniel Dalton

Hi,

I've got a program here that prints out a percentage of it's
completion. Currently with my implimentation it prints like this:
0%
1%
2%
3%
4%

etc taking up lots and lots of lines of output... So, how can I make it
write the percentage on the same line eg.
while working:
print percent
every time the line print percent is ran it should delete the old
percentage from the screen, replacing it with the new one, so as to only
use up one line... Basically I'm just printing a string of text to the
screen and every time my print command is ran I would like the old text
to be removed and my new text added (talking about the one line of the
screen here)... This is a command line program, under linux...

Thanks,

Daniel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top