The thing I want to know here should be really 'basic', but it is a question in my mind for long time and no idea where the trick is.
Let's say in a time-consuming program(either bash
or Python
), I have to print out the percentage of the progress when it's running, and basically I want to print 1%
, and after a certain time, I print 2%
, etc.. I want '2%'
to be displayed exactly at the same position where '1%'
was displayed, rather than they're like "1% 2%" or whatever. You know wget
, what I want is exactly what wget does, to show the progress of the downloading progress. Do I need to clear the previously printed character, but how?
How does it work basically...
Thanks,