Extract lines from a file automatically. Please a Help

hello, hope you can help me:
ive got a file called archivos

The content or structure of this file is

./chu0/filechu
./chu1/filechu

I extract each line from this file manually and redirect to a file, and it Works fine, so the command line is:

awk �/chu0/ {print $0}' < archivos > portal0
awk �/chu1/ {print $0}' < archivos > portal1

The problem is to extract these lines automatically, an i dont know how to do this, with a loop for example.

and i tried but gets some error whit this command

i=0
while (i<=num)
do
awk -v i=$i � /chu$i/ {print $0} < archivos > portal$i
done

how can i do that so i can extract lines from this file automatically?can you help me? please.

#!/bin/ksh

while read myLine
do
  echo "line-> [${myLine}]"
done < archivos 

Thanks for yor reply, but in this script how the code will be in born shell.?

try it as 'bourne' and see what happens.

This code lnly print the output on the screen:

line-> [./chu0/filechu]
line-> [./chu1/filechu]

But, i want is to redirect the content of each line to a file
i.e. file0 the content must be ./chu0/filechu
and file1 the content must be ./chu1/filechu
thanks

#!/bin/sh
i=0
while read myLine
do
  echo "${myLine}" > "file${i}"
  i=`expr $i + 1`
done < archivos 

Could you please comment each line what it does?. i am new at unix, why you quote some lines.
Thanks again.

Hello
Thas working, but to be sincere dont undesrtand so much

ie what some lines have curly braces and double quotes, why?

try reading the man page for sh.

Spectificall the sections on Parameter Expansion and quoting.