How to read and write files one line at a time.

I am wirting a shell script in which i want to read one line
at a time from the file and write it simultaneouly to other file one line at a time.
Please let me know about some shell utility which can help me out.
If further clarifications are needed then please let me know about them ASAP.


while read line
# do anything with that line
echo $line >> $newfile
done < $filename

Hi !
Mib !
Thanx for ur prompt reply.It is really working out.
Hope to keep the partership going.