From: "Fco. J. Ballesteros" <nemo@lsub.org>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] watch command
Date: Tue, 19 Apr 2005 10:35:51 +0200 [thread overview]
Message-ID: <d6a855f0e5e56685ce940e0640fa52ed@plan9.escet.urjc.es> (raw)
In-Reply-To: <fba2c2927e6c4dd58cd8a6ebd5ec1d86@orthanc.cc.titech.ac.jp>
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
This is how we do it.
POLL(1) Plan B — 3rd edition POLL(1)
NAME
poll - poll files for changes
SYNOPSIS
poll [ -1 ] [ -i ival ] cmd file...
DESCRIPTION
Poll monitors the given files each ival seconds (one by
default) and runs cmd when any of the files change. It uses
fstat(2) to generate a single stat(5) request for each poll
and file. If -1 is given, the program exits after the first
change noticed; otherwise, it keeps on polling the files.
The command is assumed to be at /bin and is executing using
the list of files as arguments.
SOURCE
/sys/src/cmd/poll.c
Page 1 Plan B User's Manual (printed 4/19/05)
[-- Attachment #2: Type: message/rfc822, Size: 3182 bytes --]
From: YAMANASHI Takeshi <9.nashi@gmail.com>
To: 9fans@cse.psu.edu
Subject: [9fans] watch command
Date: Tue, 19 Apr 2005 15:17:29 +0900
Message-ID: <fba2c2927e6c4dd58cd8a6ebd5ec1d86@orthanc.cc.titech.ac.jp>
I read about "watch" command in the mpx paper (*) and thought
it's interesting. The paper mentions the commandline:
watch fig1.pic | pic | troff | proof
and the pipe line runs whenever fig1.pic is modified.
Does anyone have a similar program in his pocket?
(*) hget http://cm.bell-labs.com/cm/cs/doc/83/mpx.ps.gz | gunzip | page
I'm thinking of writing a file server (watchfs) which will serve:
/n/watch/ctl
/n/watch/data/a.c
/n/watch/data/b.c
Whenever a.c and b.c are changed, a text will appear on the ctl file.
Thus, you can do something like:
% while(){read /n/watch/ctl; mk}
How's this idea?
--
next prev parent reply other threads:[~2005-04-19 8:35 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-19 6:17 YAMANASHI Takeshi
2005-04-19 6:37 ` Kenji Okamoto
2005-04-19 8:35 ` Fco. J. Ballesteros [this message]
2005-04-19 12:03 ` [SPAM] " vdharani
2005-04-19 14:52 ` Ronald G. Minnich
2005-04-19 6:49 YAMANASHI Takeshi
2005-04-19 6:50 ` Kenji Okamoto
2005-04-19 6:55 ` boyd, rounin
2005-04-19 6:57 YAMANASHI Takeshi
2005-04-19 10:47 ` Abhey Shah
2005-04-19 7:13 YAMANASHI Takeshi
2005-04-19 8:59 YAMANASHI Takeshi
2005-04-19 9:19 ` Fco. J. Ballesteros
2005-04-19 10:06 ` Charles Forsyth
2005-04-19 15:01 ` Ronald G. Minnich
2005-04-19 15:23 ` Fco. J. Ballesteros
2005-04-19 15:53 ` Lucio De Re
2005-04-19 15:59 ` Dan Cross
2005-04-19 16:02 ` Steve Simon
2005-04-19 16:23 ` boyd, rounin
2005-04-19 15:00 ` Ronald G. Minnich
2005-04-19 10:50 YAMANASHI Takeshi
2005-04-20 1:55 YAMANASHI Takeshi
2005-04-20 2:07 YAMANASHI Takeshi
2005-04-20 2:09 YAMANASHI Takeshi
2005-04-20 5:14 ` Ronald G. Minnich
2005-04-20 15:06 ` Ronald G. Minnich
2005-04-21 0:37 YAMANASHI Takeshi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d6a855f0e5e56685ce940e0640fa52ed@plan9.escet.urjc.es \
--to=nemo@lsub.org \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).