I’m looking for a Windows program/script/command line function that works like Linux’s
watch
program.
watch
periodically calls another program/whatever and shows the result, which is great for refreshing an output file or similar every second:watch cat my-output.txt
or, more powerfully:
watch grep "fail" my-output.txt
I’ve looked for it in cygwin’s library, but it doesn’t seem to be present.
Solution:
watch
is available in Cygwin, in the procps
package as listed here (this info can be found via the package search on the website, here). I don’t think this package is installed by the default cygwin setup, but it is one I usually select on new installs in order to have the watch command available.
The location of tools in packages usually match package names in Linux distributions (the package containing watch
is procps on Debian and Ubuntu too) so if the Cygwin package search function fails you, info for/from Linux distributions may offer clues.