Using colors in terminal with 'watch' command
Posted on 2004-09-10
We are monitoring an application remotely (over ssh) by viewing changes in files that it creates. Some files are rewritten by the application continually, and we watch them using:
watch -d -n1 cat [filename]
The "-d" option highlights the changes occuring, and provides a simple but effective monitoring screen.
Is there any way to incorporate colors into this? The application could insert special characters into the files.
In the xterm, typing "ls --color" highlights some files in different colors. But "watch ls --color" doesn't show the colors. Why is that?
Any creative ideas? Alternatives to watch?