From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <132f7ab76fee59596efcab59956f6c36@csplan9.rit.edu> To: 9fans@cse.psu.edu Date: Mon, 15 Oct 2007 12:46:12 -0400 From: john@csplan9.rit.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] newbie rc question Topicbox-Message-UUID: d0a4ad0c-ead2-11e9-9d60-3106f5b1d025 So, after reading the Blit paper, I thought 'watch' looked pretty neat and tried to make a simple rc script to act similarly. However, when I use the script (at the end of this email) to try something like this: man -t ls > foo watch foo | page page says 'converting from troff to postscript' but then never actually displays anything. I'm sure there's something basic I'm forgetting here--can somebody help me figure out what's wrong? Here's the code (I apologize if it doesn't meet your standards) #!/bin/rc # Watch the specified file for changes; print out the file # if there are any changes. if (~ $#* 1) { cat $1 sum = `{sum $1} while () { newsum = `{sum $1} if (! ~ $sum(1) $newsum(1)) { sum = $newsum cat $1 } sleep 1 } } if not { echo 'Usage: watch ' }