Like when using aircrack-ng, or any program that has tables of data that constantly update.
=\
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends somewhat on the system, and above all, how much you want to overwrite. For a lot of simply programs, outputting
'\r'will do the trick: it will return the cursor to the start of the line (on almost all consoles), and you can overwrite the line. (I’ve used this in the past for continuously updated progress reports:n records processed, for example. Just be sure to not output a'\n'until you’re ready.For anything more complex, the usual solution is the
curseslibrary. It should be present on most Unix (sometimes under the namencurses), and there’s a port ofncursesto Windows as well. (The generic name of the library, and its name under traditional Unix, iscurses;ncursesis a GPL implementation the library.)