removing new line character

I'm appending header and trailer record for a binary file using

echo "$header" > filename
cat oldfilename >> filename
echo "$trailer" >> filename

The echo is introducing newline character after header and trailer.Please let me know is there any possibility to get rid of newline character.

echo "$header\c" > filename

same will work for the trailer portion.

shamrock,

Thanks !Its working.