9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] unix RC shell bug
@ 2001-09-03  4:18 Byron Rakitzis
  0 siblings, 0 replies; 5+ messages in thread
From: Byron Rakitzis @ 2001-09-03  4:18 UTC (permalink / raw)
  To: 9fans, boyd

>iirc $" was not implemented in the unix rc.
>
>back in '91 (when byron released it) $" did not exist.
>i'm not sure when it was added to the plan 9 rc.
>sometime after '93 i'd guess.

I came up with $^ in rc early on. I don't have any records to show when
this first appeared, but I found an old version of rc on funet.fi, rc-1.2,
which showed this feature in 1991. Given that the work on the shell
started in the fall of 1990 this was really very early on in its life.

With some modesty I suggest that maybe this was back-ported into plan 9
from my reimplementation with a new syntax. Or maybe they came up with
the idea independently. The need for it is fairly obvious.

I chose $^ by analogy with the ^ concatenation operator, and because it
leaves the " character still uninterpreted by rc.

In general there are some incompatabilities between my rc and plan9's,
in particular with regards to the "if not" syntax. This has caused
some friction over the years, but never enough in my opinion to warrant
changing the code I wrote.

Byron.


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

* Re: [9fans] unix RC shell bug
  2001-09-01  4:54 David Gordon Hogan
@ 2001-09-01 11:19 ` Boyd Roberts
  0 siblings, 0 replies; 5+ messages in thread
From: Boyd Roberts @ 2001-09-01 11:19 UTC (permalink / raw)
  To: 9fans

iirc $" was not implemented in the unix rc.

back in '91 (when byron released it) $" did not exist.
i'm not sure when it was added to the plan 9 rc.
sometime after '93 i'd guess.




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

* Re: [9fans] unix RC shell bug
@ 2001-09-01  4:54 David Gordon Hogan
  2001-09-01 11:19 ` Boyd Roberts
  0 siblings, 1 reply; 5+ messages in thread
From: David Gordon Hogan @ 2001-09-01  4:54 UTC (permalink / raw)
  To: 9fans

> IIRC, there was a syntax change at some point,
> and the Unix rc uses the old syntax.  Try $^t
> instead of $"t.

Sorry, wrong universe.  It's always been $" in
this one.



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

* Re: [9fans] unix RC shell bug
@ 2001-09-01  4:43 David Gordon Hogan
  0 siblings, 0 replies; 5+ messages in thread
From: David Gordon Hogan @ 2001-09-01  4:43 UTC (permalink / raw)
  To: 9fans

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

IIRC, there was a syntax change at some point,
and the Unix rc uses the old syntax.  Try $^t
instead of $"t.

rc ready. Type "sz file ..." to your modem program


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

From: Matt <matt@proweb.co.uk>
To: 9fans <9fans@cse.psu.edu>
Cc: rc@hawkwind.utcs.utoronto.ca
Subject: [9fans] unix RC shell bug
Date: Sat, 1 Sep 2001 05:11:16 +0100
Message-ID: <7126271516.20010901051116@proweb.co.uk>

after hours of not noticing one of my variables was a list and not a
string (it's 5am I've been on this since 10pm!) I eventually got to
this sorry state.

in good ol' plan9

cpu% t=(1 2 3 6 7)
cpu% echo $#t
5
cpu% echo $"t
1 2 3 6 7

in /usr/local/bin/rc (ver 1.6) on FreeBSD (ver 4.2-RELEASE)

; t=(1 2 3 6 7)
; echo $#t
5
; echo $"t
syntax error


just fyi

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

* [9fans] unix RC shell bug
  2001-08-31 19:35 [9fans] Anybody runs kaffe? Richard Miller
@ 2001-09-01  4:11 ` Matt
  0 siblings, 0 replies; 5+ messages in thread
From: Matt @ 2001-09-01  4:11 UTC (permalink / raw)
  To: 9fans; +Cc: rc

after hours of not noticing one of my variables was a list and not a
string (it's 5am I've been on this since 10pm!) I eventually got to
this sorry state.

in good ol' plan9

cpu% t=(1 2 3 6 7)
cpu% echo $#t
5
cpu% echo $"t
1 2 3 6 7

in /usr/local/bin/rc (ver 1.6) on FreeBSD (ver 4.2-RELEASE)

; t=(1 2 3 6 7)
; echo $#t
5
; echo $"t
syntax error


just fyi



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

end of thread, other threads:[~2001-09-03  4:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-03  4:18 [9fans] unix RC shell bug Byron Rakitzis
  -- strict thread matches above, loose matches on Subject: below --
2001-09-01  4:54 David Gordon Hogan
2001-09-01 11:19 ` Boyd Roberts
2001-09-01  4:43 David Gordon Hogan
2001-08-31 19:35 [9fans] Anybody runs kaffe? Richard Miller
2001-09-01  4:11 ` [9fans] unix RC shell bug Matt

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