[plug] clear the screen when using the watch utility

Cameron Patrick cameron at patrick.wattle.id.au
Fri Oct 28 18:49:55 WST 2005


W.Kenworthy wrote:

> Must be losing it - I cant figure out how to clear the screen when using
> the watch utility. "watch" filters the output of the programs it runs
> and normal ansi commands get filtered.  

What exactly are you trying to achieve by "clearing the screen"?
Normally if you do something like e.g. "watch /sbin/ifconfig" it will
clear the screen automatically with each display refresh.  If you're
seeing a garbled display, the command you're watching may be writing
to stderr.  You can try something like

    $ watch mycommand '2>&1'

to redirect stderr into stdout.

Or I may be completely misunderstanding what you're asking for.

Cameron





More information about the plug mailing list