aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2019-01-23 18:57:27 +0100
committerJohn Ankarström <john@ankarstrom.se>2019-01-23 18:57:27 +0100
commit06d88f4ae796dc5aacf18f3eca162ad6e118aa64 (patch)
treefb76d2e731aa7ee81dc222c433f9a2acf408e973
parent56165f887810ea613da518807a7c7696bcaa4fd2 (diff)
downloadwhen-06d88f4ae796dc5aacf18f3eca162ad6e118aa64.tar.gz
wrote man page
-rw-r--r--watch.148
1 files changed, 48 insertions, 0 deletions
diff --git a/watch.1 b/watch.1
new file mode 100644
index 0000000..ec8b051
--- /dev/null
+++ b/watch.1
@@ -0,0 +1,48 @@
+.Dd $Mdocdate$
+.Dt WATCH 1
+.Os
+.Sh NAME
+.Nm watch
+.Nd a simple file watcher
+.\"
+.Sh SYNPOSIS
+.Nm watch
+.Op Fl i
+.Ar file
+.\"
+.Sh DESCRIPTION
+.Nm watch
+is a simple OpenBSD program that watches a given
+.Ar file
+for changes.
+When the file changes, its name (as specified in the arguments to
+.Nm watch )
+is printed on standard output.
+
+If the
+.Fl i
+argument is provided, an initial such line is printed when the
+program starts, before beginning to watch for changes.
+
+.Nm watch
+exits on SIGINT (C-c).
+.\"
+.Sh ERRORS
+If the watched file is deleted, a message is printed on standard
+error and the program exits with error code 1.
+
+If the file is renamed, a notice is printed on standard error, but
+the program keeps running.
+.\"
+.Sh EXAMPLES
+.Bd -literal -offset indent
+watch document.ms | while read; do
+ make document.pdf && kill -9 mupdf
+done
+.Ed
+.\"
+.Sh AUTHORS
+.Nm watch
+is written by
+.An John Ankarström ,
+available {on the web|by e-mail} at john{.|@}ankarstrom.se.