I have a little Perl script (On Windows) that checks some files for me as an aid to my day-to-day business. At the moment it prints out something like…
0% 25% 50% 75% Complete
But I can remember scripts I’ve used in the past that didn’t print progress on a line-by-line basis, but which updated the output on the display, presumably by moving the cursor back and over-printing what was there.
Anyone know what magic is required? Portability isn’t important to me, the script is quite disposable.
In addition to the other answers, \r will go back to the beginning of the current line