[plug] clear the screen when using the watch utility
W.Kenworthy
billk at iinet.net.au
Sat Oct 29 07:18:24 WST 2005
Try it, it dosnt work!
I use watch to run "ntp -p" and some other monitor commands. The
problem is when I change networks and therefore ntp servers, the number
of servers changes, so ntp writes to a different place on the screen
without clearing the previous. Another problem is when the network is
unreachable, the data is unreadable. Run 'watch ntp -p' and stop the
ntp daemon, wait a few seconds and restart ntp and you will see what I
mean.
So every refresh period (2 secs), I want to clear the screen before ntp
writes to the screen.
Think I'll use perl: as far as I can see watch cant deal with this.
BillK
On Fri, 2005-10-28 at 17:13 +0800, Timothy White wrote:
> Try this.
>
> watch 'clear; command you want to watch'
>
> So for example, watch 'clear; ls /home/tim/'
> Make sure the clear is before the command, otherwise it'll display the
> command, then clear, then watch will sleep for it's time ;)
>
> Tim
More information about the plug
mailing list