try

cat $1 | while(line=`{read}){
echo $line
}

no doubt you cam do without the cat but i am unsure off hand where to put the 
redirect in and i am not on plan9 just now.

-Steve

> On 5 Jan 2019, at 10:34 pm, Mack Wallace <mac...@mapinternet.com> wrote:
> 
> Another, probably more stupid question - How does one read a text file line 
> by line in an rc script.
> 
> In bash this works:
> 
> #!/bin/bash  
> 
> while read line  
> do  
> echo $line  
> done < $1 
> 
> I’ve tried:
> 
> #!/bin/rc  
> 
> while (line=`{read $1})  
> {
> echo $line  
> } 
> 
> Which produces the first line of the file in an infinite loop. I’ve tried the 
> -m argument with no output.
> 
> 
> It’s probably simple, but just can’t seem to find the equivalent.
> 
> Regards,
> 
> Mack
> 
> 
> 

Reply via email to