summaryrefslogtreecommitdiff
path: root/watch.1
diff options
context:
space:
mode:
authorKent R. Spillner <kspillner@acm.org>2012-01-26 08:42:37 -0600
committerKent R. Spillner <kspillner@acm.org>2012-01-26 08:42:37 -0600
commit81f64657ba183ee983ea98c7f97904296b2ce5aa (patch)
tree7e8b88ca5fda3c47618ec0c73b6c270a792ea772 /watch.1
parent8955ec26fecf367eafcbcddaf3276437abc5e4f3 (diff)
downloadprocps-ng-81f64657ba183ee983ea98c7f97904296b2ce5aa.tar.gz
watch: exit when command output changes.
Add new flags to watch (-g/--chgexit) so that it exits when the output changes. This is useful in builds and shell scripts, for example when deploying webapps to block the remainder of the deployment steps until after the webapp starts. e.g. watch --chgexit curl http://foo/bar
Diffstat (limited to 'watch.1')
-rw-r--r--watch.16
1 files changed, 6 insertions, 0 deletions
diff --git a/watch.1 b/watch.1
index 1e82340..41a86f4 100644
--- a/watch.1
+++ b/watch.1
@@ -11,6 +11,7 @@ runs
repeatedly, displaying its output and errors (the first screenfull). This
allows you to watch the program output change over time. By default, the
program is run every 2 seconds.
+By default,
.B watch
will run until interrupted.
.SH OPTIONS
@@ -44,6 +45,11 @@ Beep if command has a non-zero exit.
\fB\-e\fR, \fB\-\-errexit\fR
Freeze updates on command error, and exit after a key press.
.TP
+\fB\-g\fR, \fB\-\-chgexit\fR
+Exit when the output of
+.I command
+changes.
+.TP
\fB\-c\fR, \fB\-\-color\fR
Interpret ANSI color sequences.
.TP