tags:

views:

30

answers:

2

Hi

I am eager to know how to print the output on a terminal screen similar to the one that of the 'top' command.

What I mean to say is .. dynamic updation of the existing output on terminal window.

A small c program or reference to appropriate resources is expected ....

+1  A: 

I think you want to check out ncurses (or *curses, or whatever is appropriate for termio on your platform). ANSI escape sequences is also of interest :)

Tim Post
Seems ANSI escape sequences are really tough to program with .. might be the crude way of doing things ??
codingfreak
@codingfreak, I agree with tinkertim; ncurses is the way to go. It's also a pretty fun API to work with.
BobbyShaftoe
@codingfreak: I linked to escape sequences so you could see just how much pain ncurses (and others) save you.
Tim Post
Yeah guys I do agree with you ncurse really does solve the pain ...
codingfreak
+1  A: 

Ncurses (Unix-only I think) or PDCurses (portable) is the way to go.

Bastien Léonard