2

I want to make a program that will display dynamic data in the way the "top" command does but, I haven't been able to find out how to make the command line interface work. Does anyone know of some resources for building that type of interface?

  • 1
  • 2
    To expand on @IporSircer's comment: top is what is called a character cell or full-screen application. Character cell application are sort-of halfway between command-line applications (which consume and produce text) and graphical applications (which use a bitmapped display). In UNIX-like operating systems, such full screen / character cell applications (for example, the editor vim, the web browser lynx, the file manager mc or the package management tool aptitude) are built using libraries named curses (the old original) or ncurses (the less old reimplementation). – AlexP Oct 24 '17 at 02:42
  • 1
    @AlexP, please post that as an answer; it's useful and informative. – Wildcard Oct 24 '17 at 03:06
  • Use select(2) to wait for keyboard input or timeout https://linux.die.net/man/2/select – hschou Oct 24 '17 at 05:11

0 Answers0