On Linux, while stdout on the command line, I want to update a specific area, such as the output of apt-get :
54% [Waiting for headers] [Waiting for headers] 211 kB/s 3s
percent, kB / s and second will be updated every second.
If we use printf , we get some lines outputting them. I tried following printf :
printf("\e[1;1H\e[2J");
But it clears all output.
My question is: how to update a specific area and maintain stability?
coanor
source share