-2

I have a program that is a simulation, it updates constantly and writes messages in terminal, however, this causes the terminal to constantly scroll with new lines. I am wondering if there is a way to make terminal print lines and then clear after 10 seconds and then update?

1 Answers1

0

Many terminals accept special escape codes allowing the programmer to move the cursor, set the colour and many more functions.

To use it good people wrote the ncurses library https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

0___________
  • 47,100
  • 4
  • 27
  • 62