9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Rc shell FAQ
@ 2003-03-01 23:46 A.S. Kukhar
  2003-03-03 19:25 ` andrey mirtchovski
  0 siblings, 1 reply; 6+ messages in thread
From: A.S. Kukhar @ 2003-03-01 23:46 UTC (permalink / raw)
  To: 9fans

you can get it from http://ask.km.ru/plan9/doc/rcfaq.html, 
the document attempts to answer some frequently asked 
questions about rc, the Plan 9 shell. FAQ based on ``rc 
shell Frequently Asked Questions'' from Alan Watson (15 Dec 
1994).

Please forward any comments, corrections, and suggestions 
regarding this FAQ to plan9@kp.km.ua.

-kyxap


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] Rc shell FAQ
  2003-03-01 23:46 [9fans] Rc shell FAQ A.S. Kukhar
@ 2003-03-03 19:25 ` andrey mirtchovski
  2003-03-04 17:52   ` rob pike, esq.
  2003-03-05  3:42   ` A.S. Kukhar
  0 siblings, 2 replies; 6+ messages in thread
From: andrey mirtchovski @ 2003-03-03 19:25 UTC (permalink / raw)
  To: 9fans

Is this UNIX-only? I tried to find whether it mentioned anything about
regarding specifically the unix implementation of the Rc shell but
couldn't...

In Plan 9 the builtin 'return' does not exist (as it it mentioned in the
rc paper in /sys/doc) so the following examples from the FAQ would not 
work:

    fn true { return 0 }
    fn false { return 1 }

Pretty much every other example there uses 'return' at least once and
wouldn't work on Plan 9... Unless I'm missing somerhing?

andrey

On Sat, 1 Mar 2003, A.S. Kukhar wrote:

> you can get it from http://ask.km.ru/plan9/doc/rcfaq.html, 
> the document attempts to answer some frequently asked 
> questions about rc, the Plan 9 shell. FAQ based on ``rc 
> shell Frequently Asked Questions'' from Alan Watson (15 Dec 
> 1994).
> 
> Please forward any comments, corrections, and suggestions 
> regarding this FAQ to plan9@kp.km.ua.
> 
> -kyxap
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] Rc shell FAQ
  2003-03-03 19:25 ` andrey mirtchovski
@ 2003-03-04 17:52   ` rob pike, esq.
  2003-03-04 18:02     ` andrey mirtchovski
  2003-03-05  3:42   ` A.S. Kukhar
  1 sibling, 1 reply; 6+ messages in thread
From: rob pike, esq. @ 2003-03-04 17:52 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

I don't think you're missing anything.  It's rc that's missing something.
I don't know why, but it doesn't have a return statement and it should.

-rob

[-- Attachment #2: Type: message/rfc822, Size: 2929 bytes --]

From: andrey mirtchovski <mirtchov@cpsc.ucalgary.ca>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Rc shell FAQ
Date: Mon, 3 Mar 2003 12:25:55 -0700 (MST)
Message-ID: <Pine.LNX.4.44.0303031222250.28942-100000@fbsd.cpsc.ucalgary.ca>

Is this UNIX-only? I tried to find whether it mentioned anything about
regarding specifically the unix implementation of the Rc shell but
couldn't...

In Plan 9 the builtin 'return' does not exist (as it it mentioned in the
rc paper in /sys/doc) so the following examples from the FAQ would not 
work:

    fn true { return 0 }
    fn false { return 1 }

Pretty much every other example there uses 'return' at least once and
wouldn't work on Plan 9... Unless I'm missing somerhing?

andrey

On Sat, 1 Mar 2003, A.S. Kukhar wrote:

> you can get it from http://ask.km.ru/plan9/doc/rcfaq.html, 
> the document attempts to answer some frequently asked 
> questions about rc, the Plan 9 shell. FAQ based on ``rc 
> shell Frequently Asked Questions'' from Alan Watson (15 Dec 
> 1994).
> 
> Please forward any comments, corrections, and suggestions 
> regarding this FAQ to plan9@kp.km.ua.
> 
> -kyxap
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] Rc shell FAQ
  2003-03-04 17:52   ` rob pike, esq.
@ 2003-03-04 18:02     ` andrey mirtchovski
  0 siblings, 0 replies; 6+ messages in thread
From: andrey mirtchovski @ 2003-03-04 18:02 UTC (permalink / raw)
  To: 9fans

On Tue, 4 Mar 2003, rob pike, esq. wrote:

> I don't think you're missing anything.  It's rc that's missing something.
> I don't know why, but it doesn't have a return statement and it should.
> 
> -rob
> 

here is what I was referring to (from /sys/doc/rc.ps):

"I deleted the builtins export, readonly, break, continue, read, return, set,
times and unset because they seem redundant or only marginally useful."

andrey



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] Rc shell FAQ
  2003-03-03 19:25 ` andrey mirtchovski
  2003-03-04 17:52   ` rob pike, esq.
@ 2003-03-05  3:42   ` A.S. Kukhar
  1 sibling, 0 replies; 6+ messages in thread
From: A.S. Kukhar @ 2003-03-05  3:42 UTC (permalink / raw)
  To: 9fans

i just tried to rewrite existed faq (about Byron Rakitzis's 
rc) to fit only Plan 9 shell, so a few differences between 
this shells i missed (including returns). on days i will 
fix (or remove) the examples with returns and a few other 
bugs that were found by rog. 

thank you guys (andrey and rog) for your responses.

p.s. now i don`t have working plan 9 system so checking all 
the examples is a problem task

-kyxap


> Is this UNIX-only? I tried to find whether it mentioned
> anything about regarding specifically the unix
> implementation of the Rc shell but couldn't...
>
> In Plan 9 the builtin 'return' does not exist (as it it
> mentioned in the rc paper in /sys/doc) so the following
> examples from the FAQ would not work:
>
>     fn true { return 0 }
>     fn false { return 1 }
>
> Pretty much every other example there uses 'return' at
> least once and wouldn't work on Plan 9... Unless I'm
> missing somerhing?
>
> andrey



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] Rc shell FAQ
@ 2003-03-04 18:06 rog
  0 siblings, 0 replies; 6+ messages in thread
From: rog @ 2003-03-04 18:06 UTC (permalink / raw)
  To: 9fans

> I don't think you're missing anything.  It's rc that's missing something.
> I don't know why, but it doesn't have a return statement and it should.

it is at least possible to fake it with:

	fn x {
		status=blah
	}

lack of "break" is sometimes more annoying to work around.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-03-05  3:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-01 23:46 [9fans] Rc shell FAQ A.S. Kukhar
2003-03-03 19:25 ` andrey mirtchovski
2003-03-04 17:52   ` rob pike, esq.
2003-03-04 18:02     ` andrey mirtchovski
2003-03-05  3:42   ` A.S. Kukhar
2003-03-04 18:06 rog

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).