9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Jeff Sickel <jas@corpus-callosum.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] regexp metacharacter difficulty inside grap
Date: Tue, 10 Aug 2010 08:58:23 -0500	[thread overview]
Message-ID: <2D2ED7A1-CDF8-47F2-9F64-0CE08E294CFF@corpus-callosum.com> (raw)
In-Reply-To: <AANLkTikc0fihktZbi6ZqKGxPFRMmWseOiZoihDqVBZNU@mail.gmail.com>

It's good to learn new things every day.  Grap strips the ')' out, no need for all that funny sh {} business:

		if "$1" == "#" then {
			if "$2" == "(Yo" then {
				print sprintf("Yo was %f", yo)
				yo = $3
				print sprintf("Yo is %f", yo)
			}
		}

success!

mk
Creating t.ps...
	Yo was 8.579000
	Yo is 4.953400
	Yo was 4.953400
	Yo is 4.953400
Creating t.pdf...


Now to find out why the fonts on Plan 9 create nice print outs but really awkward text inside of PDF files.  My theory is that gs is not stuffing all of the fonts in as it should.



On Aug 10, 2010, at 8:41 AM, Rudolf Sykora wrote:

> On 10 August 2010 15:10, Federico G. Benavento <benavento@gmail.com> wrote:
>> this is probably related to the fact that grap(1) is an APE program,
>> and sh actually execs sh, not rc...
> 
> see this line:
> 
>>>       rc: line 2: token ')': syntax error
> 
> telling that rc is executed. As to why there is the syntax error, as I
> wrote couple of hours ago, the reason is that rc tries to execute
> /echo 23.45)/ which is syntactically wrong. What is wanted is /echo
> '23.45)'/, so that ')' is within aposrophes.
> 
> R
> 
> 




  reply	other threads:[~2010-08-10 13:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-10  5:23 Jeff Sickel
2010-08-10  8:37 ` Steve Simon
2010-08-10  8:54 ` Rudolf Sykora
2010-08-10  9:14 ` Rudolf Sykora
2010-08-10 11:45 ` erik quanstrom
2010-08-10 13:06   ` Jeff Sickel
2010-08-10 13:10 ` Federico G. Benavento
2010-08-10 13:41   ` Rudolf Sykora
2010-08-10 13:58     ` Jeff Sickel [this message]
2010-08-10 14:11       ` erik quanstrom
2010-08-10 15:52         ` Russ Cox
2010-08-11  5:41           ` Jeff Sickel
2010-08-17  6:07           ` [9fans] iwp9 macros.ms + mkfile, (was--Re: regexp metacharacter difficulty inside grap) Jeff Sickel
2010-08-17 16:21             ` Russ Cox
2010-08-18  1:28               ` Jeff Sickel
2010-08-18  1:59                 ` Russ Cox
2010-08-20 14:58                   ` Jeff Sickel
2010-08-21  2:22                     ` Russ Cox

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=2D2ED7A1-CDF8-47F2-9F64-0CE08E294CFF@corpus-callosum.com \
    --to=jas@corpus-callosum.com \
    --cc=9fans@9fans.net \
    /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).