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.
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
Post a Comment