I finally found the solution:
#! /bin/sh
cat <<EOF > myfile # temporary file
#! /bin/sh
echo -e "Content-type: text/html; charset=iso-8859-1"
echo -e "
<html>
<head>
<title></title>
</head>
<body>
<p>Text</p>
</body>
</html>\c"
EOF
chmod 777 myfile
mount -o bind myfile myfile # mount temporary on the original myfile
rm myfile
The busybox shell didn't display the pasted tabs in the vi editor correctly, so I used Vim's set: noai
command.
set: noai
solved the tab problem, but there was this extra line after the HTML code.
The solution to this was using the \c
escape character.
If someone has a better answer, feel free to post it.