From: john@csplan9.rit.edu
To: 9fans@cse.psu.edu
Subject: Re: [9fans] newbie rc question
Date: Mon, 15 Oct 2007 16:30:47 -0400 [thread overview]
Message-ID: <b58c099118368526226feab519d01c55@csplan9.rit.edu> (raw)
In-Reply-To: <86ef50171686ab117cd7bf95c4131fbf@quanstro.net>
>> 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
next prev parent reply other threads:[~2007-10-15 20:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-15 16:46 john
2007-10-15 17:22 ` erik quanstrom
2007-10-15 20:30 ` john [this message]
2007-10-15 20:34 ` erik quanstrom
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=b58c099118368526226feab519d01c55@csplan9.rit.edu \
--to=john@csplan9.rit.edu \
--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).