* [9fans] tail -f
@ 2004-03-08 11:04 plan9fans
0 siblings, 0 replies; 2+ messages in thread
From: plan9fans @ 2004-03-08 11:04 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 340 bytes --]
RE: tail -f in an acme window.
In a relate but slightly different tack, I still find I cannot write
documents blind, Its not that I don't have faith in troff, but I don't
have faith in my memory.
I wrote the attached C and rc script which will re-display
the given document every time its written - a poor mans vortex ☺
-Steve
[-- Attachment #2: await.c --]
[-- Type: text/plain, Size: 523 bytes --]
#include <u.h>
#include <libc.h>
void
main(int argc, char *argv[])
{
Dir *ods, *ds;
if (argc != 2){
fprint(2, "usage: await <file>\n");
exits("usage");
}
if ((ods = dirstat(argv[1])) == nil){
fprint(2, "%s - cannot stat file\n", argv[1]);
exits("dirstat");
}
for (;;) {
sleep(1);
if ((ds = dirstat(argv[1])) == nil){
fprint(2, "%s - cannot stat file\n", argv[1]);
exits("dirstat");
}
if (ds->mtime != ods->mtime)
break;
free(ds);
}
exits(0);
}
[-- Attachment #3.1: Type: text/plain, Size: 252 bytes --]
The following attachment had content that we can't
prove to be harmless. To avoid possible automatic
execution, we changed the content headers.
The original header was:
Content-Type: cannot open
Content-Disposition: attachment; filename=docvu
[-- Attachment #3.2: Type: text/plain, Size: 97 bytes --]
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="docvu.suspect"
^ permalink raw reply [flat|nested] 2+ messages in thread
* [9fans] tail -f
@ 2004-03-08 11:05 plan9fans
0 siblings, 0 replies; 2+ messages in thread
From: plan9fans @ 2004-03-08 11:05 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 37 bytes --]
Doh!, missing file attached
-Steve
[-- Attachment #2: docvu --]
[-- Type: text/plain, Size: 157 bytes --]
#!/bin/rc
x=`{doctype $1}
apid=not
while(){
if (test -f /proc/$apid/notepg)
echo kill>/proc/$apid/notepg
eval $x | proof -m 1 &
await $1
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-08 11:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-08 11:04 [9fans] tail -f plan9fans
2004-03-08 11:05 plan9fans
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).