As you probably know, when you run the “top” command in a terminal, it will show you the busiest processes on your computer and update the values periodically without adding a single line.
What is the technique called that allows it do this — to change the printed string from a CLI program?
One way is to get the get the width/height of the terminal window, and just clear/print whole screen every time. Another way is to use VT100 escape codes to reposition cursor and overwrite whats on that position. A third way is to use a library such as
ncurses.