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
This commit is contained in:
6
watch.1
6
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
|
||||
|
Reference in New Issue
Block a user