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