>> 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?
> 
> the file descriptor is never closed, thus page never stops to render
> what it's got.
> 
> what you want is the same thing with the cmd rolled inside.  something
> like
> 
> #!/bin/rc
> 
> if(! ~ $#* 2){
>       echo usage: w file cmd >[1=2];
>       exit usage
> }
> 
> s=''
> while(){
>       n=`{sum $1| sed 's/ .*//g'}
>       if(! ~ $s $n){
>               s=$n
>               $2 < $1
>       }
>       sleep 1
> }

This doesn't quite allow for the same possibilities as the original
Unix program seemed to, where you could do:
watch fig1.pic | pic | troff | page
instead of being limited to just one command. Can the problem of
open file descriptors be solved in rc while still giving a nice general
tool, or is it necessary to go to C?


John

Reply via email to