Print a closing XML tag shell script

I have a shell script that does everything I need it to do. But, when I was testing it I realized it doesn't print the closing XML tag.... Does anyone know how to incorporate printing the XML tag with my script? I am using AWK any help would be appreciated.

Your description is rather vague, but maybe you want to add something like:

END{print "</xml>"}

somewhere in your awk script.

END{
for(i=1;i<=3;i++){
ft=foot
e=end
sub(tot, i==3?rec+rem : rec, ft)
print ft>xml
}

... I have this right now. I just don't know how to add to this to print the closing XML tag?

---------- Post updated at 02:12 PM ---------- Previous update was at 02:08 PM ----------

that

e=end

is a mistake that wasn't supposed to be in there

---------- Post updated at 02:28 PM ---------- Previous update was at 02:12 PM ----------

I didn't? I copied and pasted it into the code brackets...?

Why don't you try to add Doc Cragun's proposal to your END section? Like

END{
.
.
.
print ft>xml
print "</xml>">xml
}

I got it. All set. Thanks.