bash - is there a linux program to continuously run another program without flicker? -


i run command line program again , again inside infinite loop.
program output different data.

whenever new data output, previous data overwritten.

example:
following program output time of day.

#include <stdio.h> #include <time.h>  int main (){   time_t rawtime;   struct tm * timeinfo;   time ( &rawtime );   timeinfo = localtime ( &rawtime );   printf ( "current local time , date: %s", asctime (timeinfo) ); } 

the naive approach following:

while true; ./main; clear; done 

of course, clear screen every run, , cause flicker.
enter image description here

i pipe custom program refreshes output on change,
hoping find solution using standard linux commands
(or bash language features).

the program output multi-line, returning(/r) , re-writting not option.

if have command watch available, use that. type

watch ls 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -