Every time I use the watch command in the terminal the output is displayed from the screen start and it seems a bit awkward. I am hoping to make watch display the output at the screen center.
$ watch -n 1 du -hs "*.part"
52K Prince of Tennis Episode 100 English Subbed Online - Chia-Anime.mp4.part
64M Prince of Tennis Episode 92 English Subbed Online - Chia-Anime.mp4.part
53M Prince of Tennis Episode 93 English Subbed Online - Chia-Anime.mp4.part
23M Prince of Tennis Episode 94 English Subbed Online - Chia-Anime.mp4.part
13M Prince of Tennis Episode 95 English Subbed Online - Chia-Anime.mp4.part
24K Prince of Tennis Episode 96 English Subbed Online - Chia-Anime.mp4.part
12K Prince of Tennis Episode 97 English Subbed Online - Chia-Anime.mp4.part
40K Prince of Tennis Episode 98 English Subbed Online - Chia-Anime.mp4.part
36K Prince of Tennis Episode 99 English Subbed Online - Chia-Anime.mp4.part
I want this output to start appearing from the center of the screen.
You can combine
watch
andprintf
to produce your desired output.Here is an example script:
Save it with a name like
script.sh
and run it like:the output would be:
Here is an other script:
run it:
it's going to show you a result look like:
Use as many
\t
you need to get your desired result.