How to replace a word with a series of words in a file

Hi,

I have a Template file 'TL.body' which says as follows:

"There are no <FILENAME> files on the server. "

The missing file names are identified and stored in a variable.
For Eg: MISSFILE="abc.txt def.txt xyz.txt"

I want the values of MISSFILE variable to be replaced against <FILENAME> and store the result in another Temp file.

I tried using the following command:
sed 's/<FILENAME>/'$MISSFILE'/g' TL.body > Temp.txt

However, it gives following error:
sed: Function s/<FILENAME>/abc.txt cannot be parsed.

Could somebody help me out to overcome this problem.

TIA

Regards,
Ramesh

The sed expression should be surrounded by double quotes.

sed "s/<FILENAME>/$MISSFILE/g" TL.body > Temp.txt

Or better yet

sed "s/.FILENAME./$MISSFILE/g" TL.body > Temp.txt

The . should take care of the meta-characters that need to be escaped.

Thanks a lot Vino... It works!