Thanks...

I'm running Bell Labs Plan 9 in Virtualbox. (I’m not sure how to get the 
version from the os or from rc)

I copied and pasted the snip directly into a script with only that in it - same 
error as before:“rc (testread): variable name not singleton!”

As for the second part - I will move that to the other thread. There are now 
some things I’m exploring there with the ifs variable, (which I thought the ifs 
variable was limited in plan 9 from what I read). 

Mack
 

> On Jan 5, 2019, at 6:46 PM, Steve Simon <st...@quintile.net> wrote:
> 
> What are you running this on, is this byron's rc on unix?
> 
> I just tried the secript I posted, cut and pasted into a
> tiny shell scropt called testread, and it just worked™
> 
> maybe some other part of your script has a problem?
> 
> My script below
> -----snip-----snip-----
> #!/bin/rc
> 
> cat $1 | while(line=`{read}){
> echo $line
> }
> 
> -----snip-----snip-----
> 
> 
> Also, I didn't have the time to read all of your previous question,
> but I think what you are after is $"varname, this expands to the value
> of the variable but as a single argument, no matter if it, when
> it was assigned, had multiple, white space seperated words in it.
> 
> for example:  (NB: hugo% is my prompt)
> 
>       hugo% fred=(a b c d)
> 
>       hugo% echo $fred^-letter
>       a-letter b-letter c-letter d-letter
> 
>       hugo% echo $"fred^-letter
>       a b c d-letter
> 
> -Steve
> 
> 


Reply via email to