Using awk you don't need a loop, since awk parses a text file line by line. You simply have to give your world list as argument to awk and write the proper print statements, inserting $0 in place of THE WORD. Otherwise you can do a simple shell script which reads the world list and echoes the proper lines, like:
Code:
while read word
do
echo "<pardef n=\"${word}__n\">" >> output_file
echo " <e>" >> output_file
....
done < <(cat world_list)
just escaping the literal double quotes, and eventually other special characters. Or you can create a little text file as a template, containing the lines you want to insert and a pattern to be substituted by sed, for example THE_WORD. Then again in a loop:
Code:
while read word
do
sed s/THE_WORD/$word/g template_file >> output_file
done < <(cat world_list)